码迷,mamicode.com
首页 > 其他好文 > 详细

LAMP编译安装部分

时间:2018-07-12 21:43:22      阅读:178      评论:0      收藏:0      [点我收藏+]

标签:root   http   system   src   5.6   图片   scripts   inf   word   

# yum install -y apr-devel apr-util-devel pcre-devel

# wget http://mirror.bit.edu.cn/apache/httpd/httpd-2.4.29.tar.gz

# tar zxvf httpd-2.4.29.tar.gz -C /usr/src/

# cd /usr/src/httpd-2.4.29

# ./configure --prefix=/usr/local/http --enable-so --enable-rewrite

# make

# make install

ln -s /usr/local/http/bin/httpd /usr/local/sbin

cp /usr/local/http/bin/apachectl  /etc/init.d/httpd

chmod +x /etc/init.d/httpd

 

【Mysql】

# yum install -y cmake bison-devel ncurses-devel perl-devel

[root@zabbix-server ~]# yum install -y cmake ncurses-devel

[root@zabbix-server ~]# wget http://downloads.mysql.com/archives/mysql-5.6/mysql-5.6.20.tar.gz

[root@zabbix-server ~]# tar zxvf mysql-5.6.20.tar.gz -C /usr/src/

[root@zabbix-server ~]# cd /usr/src/mysql-5.6.20/
[root@zabbix-server mysql-5.6.20]# cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DSYSCONFDIR=/etc/ -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_EXTRA_CHARSETS=all

[root@zabbix-server mysql-5.6.20]# make

[root@zabbix-server mysql-5.6.20]# make install

[root@zabbix-server mysql-5.6.20]# cp support-files/my-default.cnf /etc/my.cnf

[root@zabbix-server mysql-5.6.20]# chown -R mysql:mysql /usr/local/mysql/ 

[root@zabbix-server mysql-5.6.20]# /usr/local/mysql/scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/

[root@zabbix-server mysql-5.6.20]# echo "PATH=$PATH:/usr/local/mysql/bin" >> /etc/profile
[root@zabbix-server mysql-5.6.20]# source /etc/profile
[root@zabbix-server mysql-5.6.20]# cp support-files/mysql.server /etc/init.d/mysqld
[root@zabbix-server mysql-5.6.20]# chmod +x /etc/init.d/mysqld 
[root@zabbix-server mysql-5.6.20]# chkconfig --add mysqld

[root@zabbix-server mysql-5.6.20]# systemctl start mysqld 

[root@zabbix-server mysql-5.6.20]# ps -ef | grep mysqld 
root 53925 1 0 18:10 ? 00:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/usr/local/mysql/data --pid-file=/usr/local/mysql/data/zabbix-server.pid
mysql 54040 53925 9 18:10 ? 00:00:00 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/usr/local/mysql/data/zabbix-server.err --pid-file=/usr/local/mysql/data/zabbix-server.pid
root 54064 17256 0 18:11 pts/1 00:00:00 grep --color=auto mysqld

 

【PHP】

[root@zabbix-server ~]# yum install -y zlib-devel libxml2-devel libmcrype

[root@zabbix-server ~]# tar jxf php-5.4.6.tar.bz2 -C /usr/src/
[root@zabbix-server ~]# cd /usr/src/php-5.4.6/

[root@zabbix-server php-5.4.6]# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/http/bin/apxs --with-mysql=/usr/local/mysql/ --with-config-file-path=/usr/local/php --enable-mbstring

[root@zabbix-server php-5.4.6]# make

[root@zabbix-server php-5.4.6]# make install

[root@zabbix-server php-5.4.6]# cp php.ini-development /usr/local/php/php/php.ini

技术分享图片

技术分享图片

技术分享图片

 【拓展】

技术分享图片

# mysqld_safe --skip-grant-tables &

mysql> update user set password=PASSWORD("123.com")where user="root";
Query OK, 3 rows affected (0.00 sec)

LAMP编译安装部分

标签:root   http   system   src   5.6   图片   scripts   inf   word   

原文地址:https://www.cnblogs.com/bixiaoyu/p/9297943.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!