Last active
August 29, 2015 14:03
-
-
Save vjaro/130b6b2d4cf9b01757b8 to your computer and use it in GitHub Desktop.
Manual PHP building
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| wget -q -O - http://www.atomicorp.com/installers/atomic | sh | |
| yum install httpd -y | |
| iptables -I INPUT -p tcp --dport 80 -j ACCEPT | |
| service iptables save | |
| service httpd restart | |
| check if appache is installed | |
| yum install mysql-server mysql -y | |
| service mysqld start | |
| /usr/bin/mysql_secure_installation | |
| service mysqld restart | |
| Download the php file to a directory (any) | |
| wget -O /tmp/filenameWithExtension 'http://www.google.com/logo.jpg' | |
| gunzip php-5.x.x.tar.gz | |
| tar -xvf php-x-x.tar | |
| yum install httpd-devel -y | |
| yum install libxml2-devel -y | |
| yum install openssl-devel -y | |
| yum install bzip2-devel -y | |
| yum install patch gcc libstdc++ gcc-c++ binutils libtools autoconf make -y | |
| yum install libc-client-devel -y | |
| yum install libXpm-devel -y | |
| yum install freetype-devel -y | |
| yum install t1lib-devel -y | |
| yum install curl-devel -y | |
| yum install libjpeg-turbo-devel -y | |
| yum install libpng-devel -y | |
| yum install gmp-devel -y | |
| yum install mysql-devel -y | |
| yum install gmp-devel.x86_64 -y | |
| yum install libmcrypt-devel.x86_64 -y | |
| yum install libtool-ltdl-devel | |
| chmod -R 755 /path/to/your php | |
| cd /path/to your php | |
| vi install-sh | |
| paste configuration e.g. for sugar CRM | |
| ./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --cache-file=../config.cache --with-libdir=lib64 --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --disable-debug --with-pic --disable-rpath --with-pear --with-bz2 --with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir=/usr --with-xpm-dir=/usr --enable-gd-native-ttf --with-t1lib=/usr --without-gdbm --with-gettext --with-gmp --with-iconv --with-jpeg-dir=/usr --with-openssl --with-pcre-regex --with-zlib --with-layout=GNU --enable-exif --enable-ftp --enable-magic-quotes --enable-sockets --with-kerberos --enable-ucd-snmp-hack --enable-shmop --enable-calendar --with-libxml-dir=/usr --enable-xml --with-mhash --with-apxs2=/usr/sbin/apxs --libdir=/usr/lib64/php --with-mysql --with-mysqli --with-gd --disable-dom --disable-dba --without-unixODBC --disable-phar --disable-fileinfo --without-pspell --disable-wddx --disable-posix --disable-sysvmsg --disable-sysvshm --disable-sysvsem --enable-bcmath --with-curl --with-imap --with-imap-ssl --enable-mbstring --enable-soap --enable-zip --enable-phar --with-mcrypt=/usr/lib64/php/modules | |
| ./install.sh | |
| make | |
| make install | |
| php -v. If there are errors: | |
| php --ini | |
| remove all the files in that directory | |
| service httpd restart | |
| vi /etc/httpd/conf/http.conf, and add the following lines | |
| AddType application/x-httpd-php .php .phtml | |
| Add the index.php to the DirectoryIndex | |
| Adding VirtualHost | |
| mkdir /etc/httpd/vhosts | |
| vi /etc/httpd/conf/httpd.conf | |
| remove the comment on NameVirtualHost *:80 | |
| add line Include vhosts/*.conf and save | |
| cd /etc/httpd/vhosts | |
| vi <your virtual host name>.vhosts.conf | |
| Uncomment the following line on the httpd.conf file | |
| NameVirtualHost *:80 | |
| <VirtualHost *:80> | |
| ServerName inpropert | |
| DocumentRoot /var/www/html | |
| <Directory /var/www/html> | |
| Options FollowSymLinks -Indexes | |
| AllowOverride All | |
| Order deny,allow | |
| Allow from all | |
| </Directory> | |
| </VirtualHost> | |
| save then restart apache | |
| run chcon -R -t httpd_sys_content_t /path/dir | |
| NOTE: | |
| if at any moment the atomicorp goes into error when installing mysql or apache or whatever from their repo execute the following commands:P | |
| yum clean all | |
| yum update atomic-release |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment