安装mysql
shell>; groupadd mysql
shell>; useradd -g mysql mysql
shell>; cd /usr/local
shell>; tar zxvf mysql.tar.gz
shell>; cd mysql
shell>; ./configure –prefix=/usr/local
shell>;make;make install
shell>; scripts/mysql_install_db --user=mysql
shell>; chown -R root .
shell>; chown -R mysql var
shell>; chgrp -R mysql .
shell>; bin/mysqld_safe --user=mysql &
./bin/mysqladmin -u root password "123456" 基于安全的原因,为root用户设置密码才能让root用户登陆mysql,不然会有2002错误出现
建立启动脚本:
cp ./support-files/mysql.server /etc/init.d/mysql
安装apache
tar -zxvf httpd-2.0.54.tar.gz
cd httpd-2.0.54.tar.gz
./configure --prefix=/var/www --enable-so 这个选项一定要有
make && make install
建立启动脚本
cp /var/www/bin/apachectl /etc/init.d/httpd
cd /etc/rc3.d
ln -s ../init.d/httpd S85httpd
ln -s ../init.d/httpd K85httpd
安装php
#./configure --prefix=/usr/local
--with-apxs2=/var/www/bin/apxs
--with-config-file-path=/usr/local
--enable-socket
--with-mysql=/usr/local/mysql
--with-zlib-dir=/usr/include
--with-gd
--enable-mbstring (这个选项一定要有,否则在访问页面的时候会出现mb_ereg()函数未定义的提示)
注意:这些选项是必须的,如果有编译不能通过的情况,请安装相应的包。
#make && make install
cp php.ini-dist /user/local/php.ini
vi /www/conf/httpd.conf
加入:
###############for php and cacti###################
AddType application/x-tar .tgz
AddType application/x-httpd-php .php
AddType image/x-icon .ico
DirectoryIndex index.php index.html index.html.var
#######################over########################
/etc/init.d/httpd restart
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 零经验选手,Compose 一天开发一款小游戏!
· 通过 API 将Deepseek响应流式内容输出到前端
· 因为Apifox不支持离线,我果断选择了Apipost!
2008-03-10 java学习笔记2:对象的"引用"之二
2008-03-10 java学习笔记1:对象的"引用"
2008-03-10 Ray Ozzie——宇宙中最顶尖的程序员
2008-03-10 将Java代码打包为exe文件