Ubuntu 7.1 server从无到有搭建jsp/php/rails全能WEB生产环境(二)
2007-12-14 20:11
567 查看
版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本版权声明。
http://www.dingl.com/blog/archives/13
作者:丁令
正式开始安装软件,这部分主要是mysql/apache的安装。
一、安装mysql
mysql使用utf-8作为默认编码:
groupadd mysql
useradd -g mysql mysql
tar -zxvf mysql-5.0.45.tar.gz
cd mysql-5.0.45
./configure –prefix=/usr/local/mysql –with-charset=utf8 –with-collation=utf8_general_ci –with-extra-charsets=latin1
make
make install
cp support-files/my-medium.cnf /etc/my.cnf
cd /usr/local/mysql
bin/mysql_install_db –user=mysql
chown -R root .
chown -R mysql var
chgrp -R mysql .
bin/mysqld_safe –user=mysql &
将mysql加入PATH:
vi /etc/profile
增加:
PATH=/usr/local/mysql/bin:”${PATH}”
让mysql随系统一起启动
cp support-files/mysql.server /etc/init.d/mysqld
cd /etc/init.d
update-rc.d mysqld defaults
重启服务器,验证mysql是否能随系统正常启动,启动后:
mysql
如果能直接进入则说明启动成功。
为了安全,修改root密码:
mysql>use mysql
mysql>UPDATE user SET password=PASSWORD(’new_password’) WHERE user=’root’;
mysql>FLUSH PRIVILEGES;
mysql>exit
二、安装apache
1、安装apache前,先安装openssl,因为后面要配置apache支持https协议:
tar -zxvf openssl-0.9.8e.tar.gz
cd openssl-0.9.8e
./config –prefix=/usr/local/ssl
make
make test
make install
2、安装apache,configure参数可根据需要调整。
tar -zxvf httpd-2.2.6.tar.gz
cd httpd-2.2.6
./configure –prefix=/usr/local/apache –enable-modules=all –enable-rewrite –enable-forward –enable-ssl –with-ssl=/usr/local/ssl –enable-mods-shared=all –enable-deflate –enable-proxy –enable-proxy-balancer –enable-proxy-http
make
make install
修改conf/httpd.conf的ServerName:
ServerName 127.0.0.1:80
测试apache是否正常
让apache随系统一起启动
cp /usr/local/apache/bin/apachectl /etc/init.d/httpd
cd /etc/init.d
update-rc.d httpd defaults
版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本版权声明。
http://www.dingl.com/blog/archives/13
作者:丁令
http://www.dingl.com/blog/archives/13
作者:丁令
正式开始安装软件,这部分主要是mysql/apache的安装。
一、安装mysql
mysql使用utf-8作为默认编码:
groupadd mysql
useradd -g mysql mysql
tar -zxvf mysql-5.0.45.tar.gz
cd mysql-5.0.45
./configure –prefix=/usr/local/mysql –with-charset=utf8 –with-collation=utf8_general_ci –with-extra-charsets=latin1
make
make install
cp support-files/my-medium.cnf /etc/my.cnf
cd /usr/local/mysql
bin/mysql_install_db –user=mysql
chown -R root .
chown -R mysql var
chgrp -R mysql .
bin/mysqld_safe –user=mysql &
将mysql加入PATH:
vi /etc/profile
增加:
PATH=/usr/local/mysql/bin:”${PATH}”
让mysql随系统一起启动
cp support-files/mysql.server /etc/init.d/mysqld
cd /etc/init.d
update-rc.d mysqld defaults
重启服务器,验证mysql是否能随系统正常启动,启动后:
mysql
如果能直接进入则说明启动成功。
为了安全,修改root密码:
mysql>use mysql
mysql>UPDATE user SET password=PASSWORD(’new_password’) WHERE user=’root’;
mysql>FLUSH PRIVILEGES;
mysql>exit
二、安装apache
1、安装apache前,先安装openssl,因为后面要配置apache支持https协议:
tar -zxvf openssl-0.9.8e.tar.gz
cd openssl-0.9.8e
./config –prefix=/usr/local/ssl
make
make test
make install
2、安装apache,configure参数可根据需要调整。
tar -zxvf httpd-2.2.6.tar.gz
cd httpd-2.2.6
./configure –prefix=/usr/local/apache –enable-modules=all –enable-rewrite –enable-forward –enable-ssl –with-ssl=/usr/local/ssl –enable-mods-shared=all –enable-deflate –enable-proxy –enable-proxy-balancer –enable-proxy-http
make
make install
修改conf/httpd.conf的ServerName:
ServerName 127.0.0.1:80
测试apache是否正常
让apache随系统一起启动
cp /usr/local/apache/bin/apachectl /etc/init.d/httpd
cd /etc/init.d
update-rc.d httpd defaults
版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本版权声明。
http://www.dingl.com/blog/archives/13
作者:丁令
相关文章推荐
- Ubuntu 7.1 server从无到有搭建jsp/php/rails全能WEB生产环境(五)
- Ubuntu 7.1 server从无到有搭建jsp/php/rails全能WEB生产环境(六)
- Ubuntu 7.1 server从无到有搭建jsp/php/rails全能WEB生产环境(七)
- Ubuntu 7.1 server从无到有搭建jsp/php/rails全能WEB生产环境(一)
- Ubuntu 7.1 server从无到有搭建jsp/php/rails全能WEB生产环境(四)
- Ubuntu 7.1 server从无到有搭建jsp/php/rails全能WEB生产环境(三)
- Ubuntu Server 16.04.3上Moodle 3.3搭建(含PHP7.1编译)
- ubuntu server 10.04 搭建JSP环境
- USBWebServer 中文便携版 快速搭建 PHP/MySQL 网站服务器环境
- Ubuntu14.04-server U盘安装及django生产环境搭建简要记录
- Ubuntu Server上搭建可用于生产环境的ASP.NET服务器
- Ubuntu16.04系统搭建web环境apache2-mysql-php7
- Ubuntu 9.04 Server搭建Cherokee+PHP5+MySQL完美Web服务器
- ubuntu 11.10下面安装apache+php+mysql+phpadmin搭建web环境
- 阿里云Ubuntu系统从0搭建LAMP(Apache+MySQL+PHP)以及服务器生产环境常用配置
- LEMP(LNMP)环境搭建(ubuntu16.04(ubuntu14.04)+nginx+mysql5.7+php7.1)
- Linux Server(一)搭建Java、PHP生产环境
- ubuntu下apache+mysql+php+mysql等之webserver搭建
- 阿里云Ubuntu系统从0搭建LAMP(Apache+MySQL+PHP)以及服务器生产环境常用配置
- ubuntu 11.10下面安装apache+php+mysql+phpadmin搭建web环境