apache, php, mysql 安裝過程命令記錄
一、安裝apache httpd-2.0.64
1. ./configure --prefix=/usr/local/apache2
2. make
3. make install;
4. 配置/usr/local/apache2/conf/httpd.conf
5. 繫結內網:Listen 本機ip :80
6. 設定根目錄/usr/local/apache2,靜態頁面目錄/data/simba/apache/htdocs/web 和
cgi-bin 目錄/data/simba/apache/cgi-bin/
7. 設定開機啟動
echo '/usr/local/apache2/bin/apachectl start' >> /etc/rc.d/rc.local
cp -r /usr/local/apache2/bin/apachectl /etc/init.d/apache-httpd
chmod +x /etc/init.d/apache-httpd ;
/etc/init.d/apache-httpd start //全部模組安裝完配置好再啟動
// service apache-httpd restart
二、安裝php php-5.5.5
1. 安裝libxml2(libxml2-2.7.2); 直接./configure make && make install
2. 安裝php
./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs
--with-config-file-path=/usr/local/lib --enable-soap
3. make && make install
4. cp /home/php-5.5.5/php.ini-production /usr/local/lib/php.ini
5. 裝php soap 模組
cd /home/php-5.5.5/ext/soap #執行phpize 生成configure
/usr/local/php5/bin/phpize
./configure --with-php-config=/usr/local/php5/bin/php-config --enable-soap
make && make install
編譯後的soap.so 檔案儲存在
/usr/local/php5/lib/php/extensions/no-debug-non-zts-20121212/
查詢/usr/local/lib/php.ini 中的extension_dir = "./"
修改為extension_dir =
"/usr/local/php5/lib/php/extensions/no-debug-non-zts-20121212/"
增加以下行:extension = "soap.so"
6. 生成mod_rewrite.so
cd /home/httpd-2.0.64/modules/mappers/
/usr/local/apache2/bin/apxs -c mod_rewrite.c
/usr/local/apache2/bin/apxs -i -a -n mod_rewrite mod_rewrite.la
7. 修改http.conf 配置檔案,加入php 解析和mod_rewrite.so 模組
AddType application/x-httpd-php .php .phtml .php3 .inc
AddType application/x-httpd-php-source .phps
LoadModule php5_module modules/libphp5.so
LoadModule rewrite_module modules/mod_rewrite.so
8. php 裝mysql 模組
(需要先安裝mysql,路徑/usr/local/mysql/) // 與裝soap 模組類似
cd /home/php-5.5.5/ext/mysql #執行phpize 生成configure
/usr/local/php5/bin/phpize
./configure --with-php-config=/usr/local/php5/bin/php-config --with-mysql=/usr/local/mysql/
make && make install
編譯後的mysql.so 檔案儲存在
/usr/local/php5/lib/php/extensions/no-debug-non-zts-20121212/
查詢/usr/local/lib/php.ini 中的extension_dir = "./"
修改為extension_dir = "/usr/local/php5/lib/php/extensions/no-debug-non-zts-20121212/"
增加以下行:extension = "mysql.so"
三、Mysql 安裝 mysql-5.0.22
1) 安裝Mysql
// 編譯安裝
./configure --prefix=/usr/local/mysql
make && make install
// 設定配置檔案的監聽ip 和data 目錄
groupadd mysql
useradd -g mysql mysql
mkdir /data/mysql_db
chown -R mysql:mysql /data/mysql_db
cp support-files/my-medium.cnf /etc/my.cnf
更改my.cnf bind-address=本機ip datadir=/data/mysql_db
// 配置許可權表
chown -R mysql:mysql /usr/local/mysql
/usr/local/mysql/bin/mysql_install_db --user=mysql --datadir=/data/mysql_db
// 設定開啟自啟動
cp -r support-files/mysql.server /etc/init.d/mysqld ; chmod +x /etc/init.d/mysqld
chkconfig --add mysqld
/etc/init.d/mysqld start // sh bin/mysqld_safe & // service mysqld restart
export PATH=/usr/local/mysql/bin:$PATH
// 配置客戶端訪問,可不設定root 密碼
/usr/local/mysql/bin/mysqladmin -u root password root@test
mysql -A -uroot -proot@test
// 新增使用者,給予許可權
create user simba identified by 'simba@test';
grant select,insert,update,delete, create, drop on *.* to simba@'%' identified by 'simba@test' ;
相關文章
- apache、php、mysql安裝過程ApachePHPMySql
- 安裝apache+php記錄ApachePHP
- Mac下Apache+MySQL+PHP開發環境安裝過程MacApacheMySqlPHP開發環境
- Windows下安裝 Apache PHP Mysql RedisWindowsApachePHPMySqlRedis
- ubuntu安裝php+mysql+apache2UbuntuPHPMySqlApache
- 安裝 Apache2+PHP5+MySQLApachePHPMySql
- linux解除安裝mysql,apache,phpLinuxMySqlApachePHP
- SUSE 下安裝php+apache+mysqlPHPApacheMySql
- 在windows上安裝scala過程記錄Windows
- CentOS+Apache+Mysql+Php安裝及優化配置小記CentOSApacheMySqlPHP優化
- Centeros 6 安裝 php7 apache mysqlROSPHPApacheMySql
- Solaris 10 OS 快速安裝 Apache + Mysql + phpApacheMySqlPHP
- Linux安裝:mysql+apache+php(轉)LinuxMySqlApachePHP
- 記錄NLTK安裝使用全過程--pythonPython
- 【轉】CentOS 6.5安裝pyspider過程記錄CentOSIDE
- linux安裝和配置 mysql、redis 過程中遇到的問題記錄LinuxMySqlRedis
- 重新記錄一下ArcGisEngine安裝的過程
- centos手動編譯安裝apache、php、mysqlCentOS編譯ApachePHPMySql
- Ubuntu 16.04 安裝 Apache, MySQL, PHP7UbuntuApacheMySqlPHP
- WINXP下安裝Apache,PHP,MySQL,phpMyAdmin薦ApachePHPMySql
- 最佳化安裝 mysql+apache+php(轉)MySqlApachePHP
- Centos 安裝Mysql記錄CentOSMySql
- centos 安裝MySQL全過程CentOSMySql
- MYSQL Group Replication搭建過程記錄MySql
- 升級 PHP7 過程記錄PHP
- linux下Apache+PHP+MySQL安裝配置攻略LinuxApachePHPMySql
- Debian安裝Apache2+MySQL5+PHP5ApacheMySqlPHP
- php5.6原始碼安裝過程PHP原始碼
- PHP1:在Windows上安裝和配置PHP,Apache和MySQLPHPWindowsApacheMySql
- CentOS 6.5上安裝MySQL-Cluster 7.3.4過程筆記CentOSMySql筆記
- apache學習筆記一(安裝apache2+php+resin)(轉)Apache筆記PHP
- 解析LAMP中Apache、php、mysql預設安裝路徑LAMPApachePHPMySql
- Apache/Nginx+PHP+MySQL一鍵環境安裝包ApacheNginxPHPMySql
- Apache、SSL、MySQL和PHP平滑無縫地安裝 (轉)ApacheMySqlPHP
- FreeBSD下安裝Apache+PHP+MySQL+Tomcat(轉)ApachePHPMySqlTomcat
- redhat 5.4下安裝MYSQL全過程RedhatMySql
- MySQL 5.7.9 原始碼安裝記錄MySql原始碼
- Apache、php、mysql(最新安裝版)ApachePHPMySql