安装apache
tar -xvzf httpd-2.2.22.tar.gz
./configure --enable-dav --enable-so --enable-mods-shared=all --prefix=/usr/local/apache2 --with-included-apr
make
make install
可能会遇到的错误:
modules/http/.libs/libmod_http.a(byterange_filter.o): In function `ap_set_byterange':
byterange_filter.c:(.text+0x12c1): undefined reference to `apr_array_clear'
collect2: ld returned 1 exit status
make[1]: *** [httpd] Error 1
make[1]: Leaving directory `/root/httpd-2.2.22'
make: *** [all-recursive] Error 1
解决:
编译时加入--with-included-apr
apache加入到自启动行列
Apache安装路径为:/usr/local/apache2
Linux的启动级别为5,版本为Linux AS4
Apache安装完后,发现Apache无法自动启动,查看/etc/rc.d/rc5.d/下,应该没有S打头,httpd结尾的链接文档。
1、将apachectl文档拷贝到/etc/rc.d/init.d 中,然后在/etc/rc.d/rc5.d/下加入链接即可。
命令如下:
cp /usr/local/apache2/bin/apachectl /etc/rc.d/init.d/httpd //假如有其他的版本的Apache存在,也能够直接覆盖掉
ln -s /etc/rc.d/init.d/httpd /etc/rc.d/rc5.d/S85httpd //建立链接(85的意义后面介绍)
此时Apache就能够自动启动了。
2、运行chkconfig --list,发现没有linux服务列表中httpd,通过chkconfig --add httpd来添加,但是提示:httpd服务不支持 chkconfig。需要编辑/etc/rc.d/init.d/httpd,添加以下注释信息:
# chkconfig: 345 85 15
# description: Apache
第一行3个数字参数意义分别为:哪些Linux级别需要启动httpd(3,4,5);启动序号(85);关闭序号(15)。
保存后执行:chkconfig --add httpd,成功添加。
在rc3.d、rc4.d、rc5.d路径中会出现S85httpd的链接文档,其他运行级别路径中会出现K61httpd的链接文档。
3、运行chkconfig --list,httpd在其中。
安装mysql5
rpm -ivh Mysql—Server-xxxx.rpm
问题:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
解决: 原因是,/var/lib/mysql 的访问权限问题。
shell> chown -R mysql:mysql /var/lib/mysql
修改密码:usr/bin/mysqladmin -u root password 'new-password'
格式:mysqladmin -u用户名 -p旧密码 password 新密码
安装php5.3.8
tar -zxvf php**
编译配置: ./configure --prefix=/usr/local/php --with-mysql=/usr/ --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/php/etc
指定Mysql,必须先安装Mysql-dev**.rpm
linux下安装apache,mysql,php5简单过程和整理
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
初探 Linux操作系统 (一):站在巨人的肩膀上
GeniusIOTboy
2020-06-15 07:12:11
在CentOS 7 如何安装Dockers
GeniusIOTboy
2020-06-15 07:12:11
Linux 进程间通信和同步—消息队列
Change_Improve
2020-05-09 22:07:15
Linux在shell中如何判断传的日期是否为月末
小爽昵称已被占用
2018-11-21 03:05:08
shell学习笔记【转】
小爽昵称已被占用
2018-11-14 03:08:52
jenkins使用shell脚本启停Tomcat部署项目
水上冰石
2018-10-27 01:09:04
AIX Invalid wide character和0602-025问题
水上冰石
2018-09-02 23:09:40
Linux 无密码登录
msh158
2018-08-23 13:38:17
Linux下通过Sendmail给外部邮箱发送邮件
msh158
2018-08-23 13:38:17