-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildAll.sh
executable file
·68 lines (49 loc) · 1.43 KB
/
buildAll.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
source env.sh
echo Build Mysql now
pushd ./Mysql
cmake . -DCMAKE_INSTALL_PREFIX=${MysqlInstallingPath} -DWITH_BOOST=${CurrentPath}/Boost
make install
popd
echo Building on MYSQL done!!!!!!!!!!!!!!
echo Start to configure MYSQL
sudo groupadd mysql
sudo useradd -r -g mysql -s /bin/false mysql
pushd ${MysqlInstallingPath}
sudo chown -R mysql .
sudo chgrp -R mysql .
sudo bin/mysqld --initialize --user=mysql
sudo bin/mysql_ssl_rsa_setup
sudo chown -R root .
sudo chown -R mysql data
## This mysql server start is optional
## sudo bin/mysqld_safe --user=mysql &
#add this symbol link file to fix a building bug in PHP
pushd ${MysqlInstallingPath}/lib
sudo ln -s ./libmysqlclient.so ./libmysqlclient_r.so
popd
popd
echo Configuration on MYSQL done
echo Start to build Apache
##Prepare for apacheAPR
cp -a ./ApacheApr ./Apache/srclib/apr
pushd ./Apache/srclib/apr
./buildconf
popd
pushd ./Apache
./configure --prefix=${ApacheInstallingPath} --enable-so
make
make install
popd
echo Apache building done
echo Start to build php
pushd ./Php
./configure --with-apxs2=${ApacheInstallingPath}/bin/apxs --prefix=${PhpInstallingPath} --with-pdo-mysql --with-mysql=${MysqlInstallingPath}
make
make install
popd
echo Php Building done
#Copy the customized configuration files to apache
cp ./utilities/httpd.conf ${ApacheInstallingPath}/conf
#copy the PHP test page to apche
cp ./utilities/test.php ${ApacheInstallingPath}/htdocs