标签:apache安装
安装mariadb(二进制免编译包)vi /usr/local/mariadb/my.cnf
# The MySQL server
[mysqld]
basedir = /usr/local/mariadb
datadir = /data/mariadb
port = 3306
[root@akuilinux01 mariadb]# ps aux |grep mysql
root 1838 0.2 0.0 115388 1748 ? S 21:41 0:00 /bin/sh /usr/local/mariadb/bin/mysqld_safe --defaults-file=/usr/local/mariadb/my.cnf --datadir=/data/mariadb --pid-file=/data/mariadb/akuilinux01.pid
mysql 1960 2.7 3.0 1649312 57884 ? Sl 21:41 0:00 /usr/local/mariadb/bin/mysqld --defaults-file=/usr/local/mariadb/my.cnf --basedir=/usr/local/mariadb --datadir=/data/mariadb --plugin-dir=/usr/local/mariadb/lib/plugin --user=mysql --log-error=/data/mariadb/akuilinux01.err --pid-file=/data/mariadb/akuilinux01.pid --socket=/tmp/mysql.sock --port=3306
root 1999 0.0 0.0 112676 984 pts/0 S+ 21:41 0:00 grep --color=auto mysql
vim /etc/init.d/mariadb //定义basedir、datadir、conf以及启动参数
如果不是同时安装mysql和mariadb,就不用定义conf
basedir=/usr/local/mariadb
datadir=/data/mariadb
conf=$basedir/my.cnf
# may be overwritten at next upgrade.
$bindir/mysqld_safe --defaults-file="$conf" --datadir="$datadir" --pid-file="$mysqld_pid_file_path" "$@" &
//enable-so支持动态扩展模块,最后一个是支持大多数动态模块 这里的反斜杠是脱义字符,加上它我们可以把一行命令写成多行
./configure \--prefix=/usr/local/apache2.4 \--with-apr=/usr/local/apr \--with-apr-util=/usr/local/apr-util \--enable-so \--enable-mods-shared=most
\\ 指定支持大多数模块
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
[root@aminglinux-01 httpd-2.4.27]# yum install -y pcre-devel
[root@akuilinux01 ~]# /usr/local/apache2.4/bin/apachectl start
httpd: Could not open configuration file /usr/local/apache2/conf/httpd.conf: No such file or directory
[root@akuilinux01 ~]# mkdir -pv /usr/local/apache2/conf/
mkdir: 已创建目录 "/usr/local/apache2"
mkdir: 已创建目录 "/usr/local/apache2/conf/"
[root@akuilinux01 ~]# ln -s /usr/local/apache2.4/conf/httpd.conf /usr/local/apache2/conf/httpd.conf
[root@akuilinux01 ~]# /usr/local/apache2.4/bin/apachectl start
AH00558: httpd: Could not reliably determine the server‘s fully qualified domain name, using fe80::68fd:e6fa:c781:f5a6. Set the ‘ServerName‘ directive globally to suppress this message
[root@akuilinux01 ~]# ps aux |grep httpd
root 1475 0.0 0.1 95496 2512 ? Ss 23:16 0:00 /usr/local/apache2.4/bin/httpd -k start
daemon 1476 2.9 0.3 382324 6464 ? Sl 23:16 0:00 /usr/local/apache2.4/bin/httpd -k start
daemon 1477 3.4 0.3 382324 6464 ? Sl 23:16 0:00 /usr/local/apache2.4/bin/httpd -k start
daemon 1478 3.4 0.3 382324 6464 ? Sl 23:16 0:00 /usr/local/apache2.4/bin/httpd -k start
root 1561 0.0 0.0 112676 980 pts/0 S+ 23:16 0:00 grep --color=auto httpd
标签:apache安装
原文地址:http://blog.51cto.com/akui2521/2120085