Вы находитесь на странице: 1из 6

CentOS 7 Installation Doc.

1. Boot up CentOS 7 DVD/USB, Choose Install CentOS 7


2. Choose the language and continue.
3. Do the Changes in the next screen.
a) Change the DATE & TIME to Asia/kolkata.
b) KEYBOARD (Default)
c) LANGUAGE SUPPORT (Default)
d) SECURITY POLICY Common Profile For General-Purpose Systems.
e) INSTALLATION SOURCE (Automatically detect)
f) SOFTWARE SELECTION Choose Base environment Server with GUI,
and choose Environment Add-Ons,

● FTP Server
● File and Storage Server
● Hardware Monitoring Utilities
● High Availability
● Java Platform
● KDE
● Large System Performance
● Load Balancer
● Mainframe Access
● Network File System Client
● Performance Tools
● Print Server
● Remote Management for Linux
● Compatibility Libraries
● Development Tools
● Security Tools
● Smart Card Support

g) INSTALLATION DESTINATION Choose I will configure partitioning and


Choose standard partitioning in MANUAL PARTITIONING PAGE.
Partitioning table from 1TB hard disk
● Boot =1024 MiB
● Boot-efi =1024 MiB (or biosboot )
● Swap =4000 MiB (Double of RAM)
● / =150 GiB
● /home =100 GiB
● /usr =100 GiB
● /var =100 GiB
● /temp =100 GiB
● /app =150 GiB
● /database =150 GIB
● /backup =Fill the maximum available
( Reduce the volume of partitions as per hard disk size respectively for 500GB,
300GB etc. )

h) KDUMP Choose Disable.

4. After completing partitioning Begin Installation.

5. After completing Installation accept the License and setup Network and User
Creation and etc. Finish the configuration. ( Make sure internet connection is
ready )

POST INSTALLATION

6. Disable Firewall
Open terminal and run command,
To stop systemctl stop firewalld.service
To disable systemctl disable firewalld.service
To Check status systemctl status firewalld.service

7. Disable SE-Linux
Open the /etc/selinux/config file and set the SELINUX mode to disabled
8. Open terminal and run command yum install epel-release .

9. Install httpd
Open terminal and run command yum install httpd

10. After completing installation edit file /etc/httpd/conf/httpd.conf


Set DocumentRoot =/app/web ,
Directory =/app/web

Add type in<IfModule mime_module>


AddType application/x-httpd-php .php .phtml

11. Make a web folder in /app and give permissions


Open terminal inside /app run command
chmod 777 -R web

12. Install PostgreSQL 9.4


Open terminal and run command ,
yum install gcc
yum install zlib-devel
yum install readline-devel

13. Copy the package postgresql-9.4.0.tar home folder and extract.


Open terminal inside postgresql-9.4.0 folder and run command ,
./configure --prefix=/app/postgres
make
make install

14. Copy file postgres to etc/init.d and give permissions


Open terminal inside init.d run command
chmod 777 -R postgres

15. Open terminal and run command,


chkconfig --add postgres
16. Add user postgres from root open terminal and run ,
adduser postgres

17. Initialize the database


Add a folder data in /database/ and give permissions

Run command in terminal


chown postgres /database/data
su - postgres
/app/postgres/bin/initdb -D /database/data/

18. Edit pghba.conf add ipv4 line and postgresql.conf change listen address to *

19. Install PHP


Open terminal and run command yum install php

For customised php installation run,


yum install php-common php-bcmath php-calendar php-ftp php-gd php-jpeg
php-png php-xpm php-gettext php-imap php-mbstring php-sockets php-ttf php-
freetype php-apxs php-xml php-pgsql php-curl php-odbc php-mcrypt

Cobra Application setting And Database restoring

20. Start httpd service


Open terminal and run command,
To start systemctl start httpd.service
To enable systemctl enable httpd.service
To check status systemctl status httpd.service

21. Copy Cobra files and give permissions to folder Cobra

22. Start postgresql server


Open terminal and run command,
To start service postgres start
To check status service postgres status
23. Create the base role, roles before restoring database
Open terminal run command,
su - postgres
/app/postgres/bin/psql and then execute queries,

CREATE ROLE base_role NOSUPERUSER INHERIT CREATEDB


CREATEROLE NOREPLICATION;

CREATE ROLE b001 LOGIN NOSUPERUSER INHERIT NOCREATEDB


CREATEROLE NOREPLICATION;GRANT base_role TO b001;
( For creating login role for Uadm replace b001 in second query )

24. Create and Restore database


su - postgres
/app/postgres/bin/createdb cobra
/app/postgres/bin/psql cobra<cobra.sql
(backup should be copied in /home/postgres)

25. Edit visudo for enabling text printing


Open terminal run command visudo and press insert and edit
root ALL =(ALL) ALL
daemon ALL=(ALL) NOPASSWD: ALL
apache ALL=(ALL) NOPASSWD: ALL
For saving this press Esc : wq

26. For mcrypt, in local server change include path in php.ini to /app/KeyFiles .
Make sure php-mcrypt is installed.

*** For manual installation of apache , xml , php , postgresql use installation
packages given and install using ./configure

*** Restart the system after completing all installations and configurations and
check httpd, postgresql, network services are starting automatically.
*** Set date.timezone = Asia/Kolkata in /etc/php.ini file for correct date in Cobra

Вам также может понравиться