扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
操作系统:centos 4.3
软件列表:httpd-2.2.4.tar.gz, mysql-5.0.18.tar.gz, php-5.2.1.tar.gz
一.linux下安装mysql
小弟最近搞mysql源码安装,安装过程如下:
安装步骤:
1.groupadd mysql
2.useradd -g mysql mysql
3.tar zxvf myql-5.0.18.tar.gz
4.cd mysql-5.0.18.tar.gz
5../configure= prefix=/usr/local/mysql
6.make
7.make install
8.cp support-files/my-medium.cnf /etc/my.cnf
9.cd /usr/local/mysql
10.bin/mysql_install_db --user=mysql
11.chown -R root .
12.chown -R mysql var
13.chgrp -R mysql .
14.bin/mysqld-safe --user=mysql &
检查日志:more var/localhost.err:
070129 15:05:58 mysqld started
070129 15:05:58 InnoDB: Started; log sequence number 0 43655
070129 15:05:58 [Note] /usr/local/mysql/libexec/mysqld: ready for connections.
Version: '5.0.18-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution
查看进程:ps -aux
root 17286 0.0 0.4 5144 1096 pts/2 S 15:05 0:00 /bin/sh bin/mysqld_safe --user=mysql
mysql 17310 0.0 6.0 125272 15104 pts/2 Sl 15:05 0:00 /usr/local/myql/libexec/mysqld --basedir=/usr/local/myql --datadir=/u
root 17546 0.0 0.8 9280 2200 ? SNs 15:20 0:00 cupsd
root 17612 0.0 0.3 3876 748 pts/2 R+ 15:21 0:00 ps -aux
关闭mysql:
bin/mysqladmin shutdown
STOPPING server from pid file /usr/local/myql/var/localhost.pid
070129 15:22:28 mysqld ended
[1]+ Done bin/mysqld_safe --user=mysql
[root@localhost myql]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 5.0.18-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
如果不行的话killall mysqld,在重新启动就OK了
二.linux下安装apache
1.tar -zxvf httpd-2.2.4.tar.gz
2.cd httpd-2.2.4
3. ./configure –prefix=/www --enable-so
4.make clean
5.make
6.make install
三.linux下安装php
1.tar -zxvf php-5.2.1.tar.gz
2.cd php-5.2.1
3. ./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-apxs2=/www/bin/apxs
4.make clean
5.make
6.make install
apache中加载php模块
7 Setup your php.ini
cp php.ini-dist /usr/local/lib/php.ini
8.. Edit your httpd.conf to load the PHP module.
For PHP 4:
LoadModule php4_module modules/libphp4.so
For PHP 5:
LoadModule php5_module modules/libphp5.so
9. Tell Apache to parse certain extensions as PHP.
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者