Welcome! 登入 註冊
美寶首頁 美寶百科 美寶論壇 美寶落格 美寶地圖

Advanced

Change History

Message: Install a LAPP server: openSUSE 42 / Apahce 2.4/PostgreSQL 9.4/ PHP 5.6

Changed By: mepoadm
Change Date: November 09, 2017 07:21PM

Install a LAPP server: openSUSE 13.2/42 / Apahce 2.4/PostgreSQL 9.4/ PHP 5.6
The parts of this install article: (1) Disk partiton; (2) Install PostgreSQL 9.4; (3) Auto Start of Services; (4) Security.
<h2>Network Settings</h2>
Address:
IP Address: OOO.OOO.OOO.OOO
Subnet Mask: 255.255.255.0
Hostname: www (some thing like that)

<h2>Disk Partition</h2><pre>/boot 2GB
/swap 12GB swap (similar to size of RAM)
/ 100GB ext4
/home 1.7TB ext4
/var 120GB ext4 (preferably SSD)</pre>
<h2>Install PostgreSQL 9.4</h2>Add http://download.opensuse.org/repositories/server:/database:/postgresql/openSUSE_13.2/ to repositories.
Install through YaST:<pre> postgresql94
postgresql94-server</pre>

<h2>Services Autostart at Boot</h2>systemctl enable apache2.service
systemctl enable sshd.service
chkconfig --add postgresql
--
Use <b>chkconfig --list</b> to list all available services run-level status

<h2>Security</h2>
(1) Disable root ssh access
Edit
<b>/etc/ssh/sshd_config</b>
Set and unmark
<b>PermitRootLogin no</b>
Restart
<b>systemctl restart sshd.service</b>

(2) Restrict swith user (su)
Add to the gorup of wheel
<b>usermod -a -G wheel username</b>
Edit
<b>/etc/pam.d/su</b>
Add this line below "auth sufficient pam_rootok.so"
<b>auth required pam_wheel.so use_uid</b>

<h2>Apache</h2>
1. Configuration:
/etc/sysconfig/apache (Include Modules)
/etc/apache2/ (configuration)

2. Edit default conf (/etc/apache2/default-server.conf)
TraceEnable off (Disable HTTP TRACE method)

3. Service setting
vi /usr/lib/systemd/system/apache2.service
PrivateTmp=false

<h2>PHP</h2>
Edit php.ini (/etc/php5/cli/php.ini)

short_open_tag = On
output_handler = ob_gzhandler
upload_max_filesize = 8M
memory_limit = 512M
date.timezone = 'Asian/Taipei'
session.cookie_httponly = 1
session.cookie_secure = 1

<h2>Firewall</h2>
Enable HTTP Server
Custom Rules for SSH
Changed By: mepoadm
Change Date: July 27, 2015 01:19PM

Install a LAPP server: openSUSE 13.2/Apahce 2.4/PostgreSQL/ 9.4/ PHP 5.6
The parts of this install article: (1) Disk partiton; (2) Install PostgreSQL 9.4; (3) Auto Start of Services; (4) Security.
<h2>Disk Partition</h2><pre>/boot 2GB
/swap 12GB swap (similar to size of RAM)
/ 100GB ext4
/home 1.7TB ext4
/var 120GB ext4 (preferably SSD)</pre>
<h2>Install PostgreSQL 9.4</h2>Add http://download.opensuse.org/repositories/server:/database:/postgresql/openSUSE_13.2/ to repositories.
Install through YaST:<pre> postgresql94
postgresql94-server</pre>

<h2>Services Autostart at Boot</h2>systemctl enable apache2.service
systemctl enable sshd.service
chkconfig --add postgresql
--
Use <b>chkconfig --list</b> to list all available services run-level status

<h2>Security</h2>
(1) Disable root ssh access
Edit
<b>/etc/ssh/sshd_config</b>
Set and unmark
<b>PermitRootLogin no</b>
Restart
<b>systemctl restart sshd.service</b>

(2) Restrict swith user (su)
Add to the gorup of wheel
<b>usermod -a -G wheel username</b>
Edit
<b>/etc/pam.d/su</b>
Add this line below "auth sufficient pam_rootok.so"
<b>auth required pam_wheel.so use_uid</b>

<h2>Apache</h2>
1. Configuration:
/etc/sysconfig/apache (Include Modules)
/etc/apache2/ (configuration)

2. Edit default conf (/etc/apache2/default-server.conf)
TraceEnable off (Disable HTTP TRACE method)

3. Service setting
vi /usr/lib/systemd/system/apache2.service
PrivateTmp=false

<h2>PHP</h2>
Edit php.ini (/etc/php5/cli/php.ini)

short_open_tag = On
output_handler = ob_gzhandler
upload_max_filesize = 8M
memory_limit = 512M
date.timezone = 'Asian/Taipei'
session.cookie_httponly = 1
session.cookie_secure = 1

<h2>Firewall</h2>
Enable HTTP Server
Custom Rules for SSH
Changed By: mepoadm
Change Date: June 28, 2015 03:18AM

Install a LAPP server: openSUSE 13.2/Apahce 2.4/PostgreSQL/ PHP 5.6
The parts of this install article: (1) Disk partiton; (2) Install PostgreSQL 9.4; (3) Auto Start of Services; (4) Security.
<h2>Disk Partition</h2><pre>/boot 2GB
/swap 12GB swap (similar to size of RAM)
/ 100GB ext4
/home 1.7TB ext4
/var 120GB ext4 (preferably SSD)</pre>
<h2>Install PostgreSQL 9.4</h2>Add http://download.opensuse.org/repositories/server:/database:/postgresql/openSUSE_13.2/ to repositories.
Install through YaST:<pre> postgresql94
postgresql94-server</pre>

<h2>Services Autostart at Boot</h2>systemctl enable apache2.service
systemctl enable sshd.service
chkconfig --add postgresql
--
Use <b>chkconfig --list</b> to list all available services run-level status

<h2>Security</h2>
(1) Disable root ssh access
Edit
<b>/etc/ssh/sshd_config</b>
Set and unmark
<b>PermitRootLogin no</b>
Restart
<b>systemctl restart sshd.service</b>

(2) Restrict swith user (su)
Add to the gorup of wheel
<b>usermod -a -G wheel username</b>
Edit
<b>/etc/pam.d/su</b>
Add this line below "auth sufficient pam_rootok.so"
<b>auth required pam_wheel.so use_uid</pre>
b>

<h2>Apache</h2>
/etc/sysconfig/apache (Include Modules)
/etc/apache2/ (configuration)
vi /usr/lib/systemd/system/apache2.service
PrivateTmp=false

<h2>Firewall</h2>
Enable HTTP Server
Custom Rules for SSH
Changed By: mepoadm
Change Date: June 28, 2015 01:16AM

Install a LAPP server: openSUSE 13.2/Apahce 2.4/PostgreSQL/ PHP 5.6
The parts of this install article: (1) Disk partiton; (2) Install PostgreSQL 9.4; (3) Auto Start of Services; (4) Security.
<h2>Disk Partition</h2><pre>/boot 2GB
/swap 12GB swap (similar to size of RAM)
/ 100GB ext4
/home 1.7TB ext4
/var 120GB ext4 (preferably SSD)</pre>
<h2>Install PostgreSQL 9.4</h2>Add http://download.opensuse.org/repositories/server:/database:/postgresql/openSUSE_13.2/ to repositories.
Install through YaST:<pre> postgresql94
postgresql94-server</pre>

<h2>Services Autostart at Boot</h2>systemctl enable apache2.service
systemctl enable sshd.service
chkconfig --add postgresql
--
Use <b>chkconfig --list</b> to list all available services run-level status

<h2>Security</h2>
(1) Disable root ssh access
Edit
<b>/etc/ssh/sshd_config</b>
Set and unmark
<b>PermitRootLogin no</b>
Restart
<b>systemctl restart sshd.service</b>

(2) Restrict swith user (su)
Add to the gorup of wheel
<b>usermod -a -G wheel username</b>
Edit
<b>/etc/pam.d/su</b>
Add this line below "auth sufficient pam_rootok.so"
<b>auth required pam_wheel.so use_uid</pre>

<h2>Apache</h2>
/etc/sysconfig/apache (Include Modules)
/etc/apache2/ (configuration)
vi /usr/lib/systemd/system/apache2.service
PrivateTmp=false
Changed By: mepoadm
Change Date: June 06, 2015 03:35AM

Install a LAPP server: openSUSE 12.313.2/Apahce 2.4/PostgreSQL/ PHP 5.6
The parts of this install article: (1) Disk partiton; (2) Install PostgreSQL 9.4; (3) Auto Start of Services
; (4) Security.
<h2>Disk Partition</h2><pre>/boot 2GB
/swap 12GB swap (similar to size of RAM)
/ 100GB ext4
/home 1.7TB ext4
/var 120GB ext4 (preferably SSD)</pre>
<h2>Install PostgreSQL 9.4</h2>Add http://download.opensuse.org/repositories/server:/database:/postgresql/openSUSE_13.2/ to repositories.
Install through YaST:<pre> postgresql94
postgresql94-server</pre>

<h2>Services Autostart at Boot</h2>systemctl enable apache2.service
systemctl enable sshd.service
chkconfig --add postgresql
--
Use <b>chkconfig --list</b> to list all available services run-level status

<h2>Security</h2>
(1) Disable root ssh access
Edit
<b>/etc/ssh/sshd_config</b>
Set and unmark
<b>PermitRootLogin no</b>
Restart
<b>systemctl restart sshd.service</b>

(2) Restrict swith user (su)
Add to the gorup of wheel
<b>usermod -a -G wheel username</b>
Edit
<b>/etc/pam.d/su</b>
Add this line below "auth sufficient pam_rootok.so"
<b>auth required pam_wheel.so use_uid</pre>
Changed By: mepoadm
Change Date: June 06, 2015 03:33AM

Install a LAPP server: openSUSE 12.3/Apahce 2.4/PostgreSQL/ PHP 5.6
The parts of this install article: (1) Disk partiton; (2) Auto Start of Services
<h2>Disk Partition</h2><pre>/boot 2GB
/swap 12GB swap (similar to size of RAM)
/ 100GB ext4
/home 1.7TB ext4
/var 120GB ext4 (preferably SSD)</pre>
<h2>Install PostgreSQL 9.4</h2>Add http://download.opensuse.org/repositories/server:/database:/postgresql/openSUSE_13.2/ to repositories.
Install through YaST:<pre> postgresql94
postgresql94-server</pre>

<h2>Services Autostart at Boot</h2>systemctl enable apache2.service
systemctl enable sshd.service
chkconfig --add postgresql
--
Use <b>chkconfig --list</b> to list all available services run-level status

<h2>Security</h2>
(1) Disable root ssh access
Edit
<b>/etc/ssh/sshd_config</b>
Set and unmark
<b>PermitRootLogin no</b>
Restart
<b>systemctl restart sshd.service</b>

(2) Restrict swith user (su)
Add to the gorup of wheel
<b>usermod -a -G wheel username</b>
Edit
<b>/etc/pam.d/su</b>
Add this line below "auth sufficient pam_rootok.so"
<b>auth required pam_wheel.so use_uid</pre>
Changed By: mepoadm
Change Date: June 05, 2015 09:50AM

Install a LAPP server: openSUSE 12.3/Apahce 2.4/PostgreSQL/ PHP 5.6
The parts of this install article: (1) Disk partiton; (2) Auto Start of Services
<h2>Disk Partition</h2><pre>/boot 2GB
/swap 12GB swap (similar to size of RAM)
/ 100GB ext4
/home 1.7TB ext4
/var 120GB ext</pre>
<h2>Install PostgreSQL 9.4</h2>Add http://download.opensuse.org/repositories/server:/database:/postgresql/openSUSE_13.2/ to repositories.
Install through YaST:<pre> postgresql94
postgresql94-server</pre>

<h2>Services Autostart at Boot</h2>systemctl enable apache2.service
systemctl enable sshd.service
chkconfig --add postgresql
--
Use <b>chkconfig --list</b> to list all available services run-level status

<h2>Security</h2>
(1) Disable root ssh access
Edit
<b>/etc/ssh/sshd_config</b>
Set and unmark
<b>PermitRootLogin no</b>
Restart
<b>systemctl restart sshd.service</b>

(2) Restrict swith user (su)
Add to the gorup of wheel
<b>usermod -a -G wheel username</b>
Edit
<b>/etc/pam.d/su</b>
Uncommen
Add this line below "auth sufficient pam_rootok.so"
<b>auth required pam_wheel.so use_uid</pre>
Changed By: mepoadm
Change Date: June 05, 2015 09:21AM

Install a LAPP server: openSUSE 12.3/Apahce 2.4/PostgreSQL/ PHP 5.6
The parts of this install article: (1) Disk partiton; (2) Auto Start of Services
<h2>Disk Partition</h2><pre>/boot 2GB
/swap 12GB swap (similar to size of RAM)
/ 100GB ext4
/home 1.7TB ext4
/var 120GB ext</pre>
<h2>Install PostgreSQL 9.4</h2>Add http://download.opensuse.org/repositories/server:/database:/postgresql/openSUSE_13.2/ to repositories.
Install through YaST:<pre> postgresql94
postgresql94-server</pre>

<h2>Setrvices Auto-Sstart at Boot<Time/h2>systemctl enable apache2.service
systemctl enable sshd.service
chkconfig --add postgresql
--
Use <b>chkconfig --list</b> to list all available services run-level status

<h2>Security</h2>
(1) Disable root ssh access
Edit
<b>/etc/ssh/sshd_config</b>
Set and unmark
<b>PermitRootLogin no</b>
Restart
<b>systemctl restart sshd.service</b>

(2) Only allow certainRestrict swith users (su)
Add
to swtich to root
the gorup of wheel
<b>usermod -a -G wheel username</b>
Edit
<b>/etc/pam.d/su</b>
Uncommen
<b>auth required pam_wheel.so use_uid</pre>
Changed By: mepoadm
Change Date: June 05, 2015 09:11AM

Install a LAPP server: openSUSE 12.3/Apahce 2.4/PostgreSQL/ PHP 5.6
The parts of this install article: (1) Disk partiton; (2) Auto Start of Services
<h2>Disk Partition</h2><pre>/boot 2GB
/swap 12GB swap (similar to size of RAM)
/ 100GB ext4
/home 1.7TB ext4
/var 120GB ext</pre>
<h2>Install PostgreSQL 9.4</h2>Add http://download.opensuse.org/repositories/server:/database:/postgresql/openSUSE_13.2/ to repositories.
Install through YaST:<pre> postgresql94
postgresql94-server</pre>

<h2>Set Auto-Start at Boot<Time/h2>systemctl enable apache2.service
systemctl enable sshd.service
chkconfig --add postgresql
--
Use <b>chkconfig --list</b> to list all available services run-level status

<h2>SSecurity</h2>
(1)
isable root ssh access
</h2>
dit
<b>/etc/ssh/sshd_config</b>
Set and unmark
<b>PermitRootLogin no</b>
Restart
<b>systemctl restart sshd.service</b>


(2) Only allow certain users to swtich to root
wheel
Changed By: mepoadm
Change Date: June 05, 2015 02:18AM

Install a LAPP server: openSUSE 12.3/Apahce 2.4/PostgreSQL/ PHP 5.6
The parts of this install article: (1) Disk partiton; (2) Auto Start of Services
<h2>Disk Partition</h2><pre>/boot 2GB
/swap 12GB swap (similar to size of RAM)
/ 100GB ext4
/home 1.7TB ext4
/var 120GB ext</pre>
<h2>Install PostgreSQL 9.4</h2>Add http://download.opensuse.org/repositories/server:/database:/postgresql/openSUSE_13.2/ to repositories.
Install through YaST:<pre> postgresql94
postgresql94-server</pre>

<h2>Set Auto-Start at Boot<Time/h2>systemctl enable apache2.service
systemctl enable sshd.service
chkconfig --add postgresql
--
Use <b>chkconfig --list</b> to list all available services run-level status

<h2>Sisable root ssh access
</h2>dit
<<b>etc/ssh/sshd_config<
</b>
et and unmark
<<b>ermitRootLogin no<</b>
Restart
<b>systemctl restart sshd.service</b>
Changed By: mepoadm
Change Date: June 05, 2015 02:14AM

Install a LAPP server: openSUSE 12.3/Apahce 2.4/PostgreSQL/ PHP 5.6
The parts of this install article: (1) Disk partiton; (2) Auto Start of Services
<h2>Disk Partition</h2><pre>/boot 2GB
/swap 12GB swap (similar to size of RAM)
/ 100GB ext4
/home 1.7TB ext4
/var 120GB ext
</pre>
<h2>Install PostgreSQL 9.4</h2>Add http://download.opensuse.org/repositories/server:/database:/postgresql/openSUSE_13.2/ to repositories.
Install through YaST:<pre> postgresql94
postgresql94-server</pre>

<h2>Set Auto-Start at Boot<Time/h2>systemctl enable apache2.service
ssystemctl enable sshd.service
hkconfig --add postgresql
--
Use <b>chkconfig --list</b> to list all available services run-level status


<h2>Disable root ssh access</h2>Edit
/etc/ssh/sshd_config
Set and unmark
PermitRootLogin no
Changed By: mepoadm
Change Date: June 05, 2015 12:09AM

Install a LAPP server: openSUSE 12.3/Apahce 2.4/PostgreSQL/ PHP 5.6
The parts of this install article: (1) Disk partiton; (2) Auto Start of Services
<h2>Disk Partition</h2><pre>/boot 2GB
/swap 4GB swap
12GB swap (similar to size of RAM)
100GB ext4
/home 1.7TB ext4</pre>
<<h2>Install PostgreSQL 9.4</h2>Add http://download.opensuse.org/repositories/server:/database:/postgresql/openSUSE_13.2/ to repositories.
Install through YaST:<pre> postgresql94
postgresql94-server</pre>

h2>Set Auto-Start at Boot<Time/h2>systemctl enable apache2.service
shkconfig --add postgresql
--
Use <b>chkconfig --list</b> to list all available services run-level status
Changed By: mepoadm
Change Date: June 04, 2015 11:19PM

Install a LAPP server: openSUSE 12.3/Apahce 2.4/PostgreSQL/ PHP 5.6
The parts of this install article: (1) Disk partiton; (2) Auto Start of Services
<h2>Disk Partition</h2><pre>/boot 2GB
/swap 4GB swap
/ 100GB ext4
/home 1.7TB ext4</pre>
h2>Set Auto-Start at Boot<Time/h2>systemctl enable apache2.service
shkconfig --add postgresql
--
Use <b>chkconfig --list</b> to list all available services run-level status
Changed By: mepoadm
Change Date: June 04, 2015 11:05PM

Install a LAPP server: openSUSE 12.3/Apahce 2.4/PostgreSQL/ PHP 5.6
h2>Set Auto-Start at Boot<Time/h2>syschkconfig --add httpd
systemctl enable apache2.service
config --add postgresql
--
--
Use <b>chkconfig --list</b> to list all available services run-level status

Original Message

作者: mepoadm
Date: June 04, 2015 10:32PM

Install a LAPP server: openSUSE 12.3/Apahce 2.4/PostgreSQL/ PHP 5.6
h2>Set Auto-Start at Boot