The Perfect Server - OpenSUSE 12.2 x86_64 (Apache2, Dovecot, ISPConfig 3) - Page 3

4 Configure The Network Settings

We use Yast, the OpenSuSE system management tool to reconfigure the network card settings. After the first boot, the system is configured to get the IP address with DHCP. For a server we will switch it to a static IP address.

Run

yast2

Select Network Devices > Network Settings:

Select your network card and then Edit:

Select Statically assigned IP Address and enter the IP address, subnet mask and hostname and save the changes by selecting Next:

Now select Hostname/DNS and enter the hostname (e.g. server1.example.com) and nameservers (e.g. 8.8.8.8 and 8.8.4.4):

Now select Routing and enter the default gateway and hit OK:

To configure the firewall (in case you didn't configure it during the basic installation), select Security and Users > Firewall in Yast:

I want to install ISPConfig at the end of this tutorial which comes with its own firewall. That's why I disable the default OpenSUSE firewall now. Of course, you are free to leave it on and configure it to your needs (but then you shouldn't use any other firewall later on as it will most probably interfere with the OpenSUSE firewall).

Select Disable Firewall Automatic Starting and Stop Firewall Now, then hit Next:

Hit Finish and leave Yast:

Afterwards, you should check with

ifconfig

if your network configuration is correct. If it isn't (for example, if eth0 is missing), reboot the system...

reboot

... and check your network configuration again afterwards - it should now be correct.

 

5 Install Updates

Now we install the latest updates from the openSUSE repositories. Run

zypper update

And then reboot the server as you most likely installed some kernel updates, too:

reboot

 

6 Install Some Basic Packages

Run

zypper install findutils readline glibc-devel findutils-locate gcc flex lynx compat-readline4 db-devel wget gcc-c++ subversion make vim telnet cron iptables iputils man man-pages nano pico sudo perl-TimeDate

 

7 Journaled Quota

To install quota, run

zypper install quota

Edit /etc/fstab to look like this (I added ,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0 to the mountpoints / and /srv):

vi /etc/fstab

/dev/disk/by-id/ata-VBOX_HARDDISK_VB1d06c935-e9b5de19-part1 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-VBOX_HARDDISK_VB1d06c935-e9b5de19-part2 /                    ext4       acl,user_xattr,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0        1 1
/dev/disk/by-id/ata-VBOX_HARDDISK_VB1d06c935-e9b5de19-part3 /srv                 ext4       acl,user_xattr,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0        1 2
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0

Then run:

mount -o remount /
mount -o remount /srv

quotacheck -avugm
quotaon -avug

Dont be worried if you see these error messages - they are normal when you run quotacheck for the first time:

server1:~ # quotacheck -avugm
quotacheck: Scanning /dev/sda2 [/] done
quotacheck: Cannot stat old user quota file: No such file or directory
quotacheck: Cannot stat old group quota file: No such file or directory
quotacheck: Cannot stat old user quota file: No such file or directory
quotacheck: Cannot stat old group quota file: No such file or directory
quotacheck: Checked 3872 directories and 32991 files
quotacheck: Old file not found.
quotacheck: Old file not found.
quotacheck: Scanning /dev/sda3 [/srv] done
quotacheck: Cannot stat old user quota file: No such file or directory
quotacheck: Cannot stat old group quota file: No such file or directory
quotacheck: Cannot stat old user quota file: No such file or directory
quotacheck: Cannot stat old group quota file: No such file or directory
quotacheck: Checked 6 directories and 0 files
quotacheck: Old file not found.
quotacheck: Old file not found.
server1:~ #

Share this page:

7 Comment(s)

Add comment

Comments

From: at: 2012-09-10 20:57:23

The docuument refers to the installation of Ruby, while this is actually not documented.


OpenSuse 12.2 is not able to compile mod_ruby successfully (neither is the latest fedora actually) and no solution has been found.


 


Please remove the reference to Ruby from the document and place a warning in the document that this OS cannot be configured to use Ruby as a module inside ISPConfig 3.0.46!


 


regards,


 


René Camies

From: at: 2012-10-11 12:33:33

Hi,

I have the OpenSuse 12.1 x86_64 installed in a VMWare Workstation 9 machine. 2CPUs, 2 Cores and 3GB RAM allocated to the machine. 

So far so good until the fstab modification. I always end up with error:

mount: /etc/fstab: parse error: ignore entry at line 3.
mount: /etc/fstab: parse error: ignore entry at line 4.

I only tried the / partition first. Here is my fstab:

osuse1:~ # cat /etc/fstab
/dev/sda1 swap swap defaults  0 0
/dev/sda2 /  ext4 acl,user_xattr,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0 1 1
/dev/sda3 /srv ext4 acl,user_xattr 1 2
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0

Thanks for helping me find the problem.

From: Anonymous at: 2012-12-15 04:08:01

change text editor. I have this same problem with vi and nano, but in mc(midnight commander) all is ok.

From: Dorin at: 2012-10-18 10:48:00

You need to add postmaster_address = postmaster@example.com in protocol lda field, or else you will receive this error when sending mail: "Error reading configuration: Invalid settings: postmaster_address setting not given lda: Fatal: Internal error occurred. Refer to server log for more information."

 SOLUTION:

vi /etc/dovecot/dovecot.conf

 protocol lda {

  mail_plugins = sieve quota

add this line here >  postmaster_address = postmaster@example.com

}

From: Anonymous at: 2013-06-07 20:40:03

don't forget after clamv installation:

# freshclam -v 

From: Waqar at: 2013-12-31 10:36:04

The person above is a genius!

Thanks 

From: Anonymous at: 2012-12-15 05:10:29

I have problem with this config. Problem is with address. With IP address (eg. https://192.168.1.1:8080) works ok, but with domain name dont.