Sie sind auf Seite 1von 4

INSTALL & CONFIGURATION WEB SERVER PHP 5.

6
FOR “LARAVEL FRAMEWORK” IN SYSTEM OPERATION CENTOS 7

1. Update system
# yum -y update

2. Install vim editor


# yum -y install vim

3. Install composer
# curl -k -sS https://getcomposer.org/installer | php
# chmod +x composer.phar
# mv composer.phar /usr/local/bin/composer

4. Create “user project” directory for to upload assets project


# useradd alabaik
# passwd alabaik
*login to user_project
$ mkdir /home/alabaik/public_html
“Install Laravel Via Composer Create-Project”
$ composer create-project --prefer-dist laravel/laravel public_html "5.2.*"
“Directory Permissions”
$ chmod 755 /home/alabaik/public_html
$ chmod 711 /home/alabaik
$ cd public_html
$ chmod 777 storage/*
$ chmod 777 storage/framework/*
$ chmod 777 bootstrap/chace/*

7 user = rwx 7 group = rwx 7 other =rwx


7 user = rwx 5 group = r_x 5 other = r_x
7 user = rwx 1 group = __x 1 other = __x

5. Install epel-release for epel repository


# yum -y install epel-release
# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
6. Install apache
# yum -y install httpd
*configuration
# vim /etc/httpd/conf/httpd/conf
Line 86 : ServerAdmin root@your_domain
Line 42 : Listen 8088
# vim /etc/httpd/conf.d/your_domain.conf
<VirtualHost *:8088>
Document /home/alabaik/public_html/public
ServerName dev.alabaik.com
<Directory /home/alabaik/public_html/ >
AllowOverride All
</Directory>
<VirtualHost>
# systemctl start httpd
# systemctl enable httpd
7. Install PHP 5.6
# yum -y install php56w php56w-mysql php56w-mcrypt php56w-dom
# yum -y install php56w-mbstring
*configuration
# vim /etc/php.ini
Line 469 : display_errors = On
Line 889 : date.timezone = “Asia/Makassar”
# systemctl restart httpd

8. Install maria database server


# yum -y install mariadb-server
# systemctl start mariadb
# systemctl enable mariadb
# sudo mysql_secure_installation
9. Install FTP (File Transfer Protocol)
# yum -y install vsftpd
# vim /etc/vsftpd/vsftpd.conf
Line 12: no anonymous
anonymous_enable=NO
Line 82,83: uncomment ( allow ascii mode )
ascii_upload_enable=YES
ascii_download_enable=YES
Line 100, 101: uncomment ( enable chroot )
chroot_local_user=YES
chroot_list_enable=YES
Line 103: uncomment ( specify chroot list )
chroot_list_file=/etc/vsftpd/chroot_list
Line 109: uncomment
ls_recurse_enable=YES
Line 114: change ( if use IPv4 )
listen=YES
Line 123: change ( turn to OFF if it's not need )
listen_ipv6=NO
add follows to the end
specify root directory ( if don't specify, users' home directory become FTP
home directory)
local_root=public_html
use localtime
use_localtime=YES
turn off for seccomp filter ( if you cannot login, add this line )
seccomp_sandbox=NO
# vim /etc/vsftpd/chroot_list
add users you allow to move over their home directory
User_project
# systemctl start vsftpd
# systemctl enable vsftpd

10. Installing Node.js 7.x via package manager


# curl --silent --location https://rpm.nodesource.com/setup_7.x | bash -
# yum -y install nodejs
# yum install gcc-c++ make
*running nodejs to port 80
# iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port [listen_port]

11. Install semanget command


# yum install policycoreutils-python
# which semanage
# yum provides semanage
# semanage port -a -t http_port_t -p tcp 8088
Information :
“ # “ <= root mode
“ $ “ <= user mode
Created by Muh. Hade Mopilie

Das könnte Ihnen auch gefallen