Howto: Ubuntu/LDAP/Postfix

All about webserver configurations, PHP and databases.

Moderator: Thorsten

Post Reply
Tinman
Posts: 19
Joined: Sun May 09, 2010 3:34 pm

Howto: Ubuntu/LDAP/Postfix

Post by Tinman »

This is the end result of a months work learning Linux and all the associated modules I needed to setup phpmyFAQ on our Windows 2003 domain. This should be of help to completely novice users like myself. If you notice something wrong here, please point it out to me.


1. Install Ubuntu 9.10 server (http://releases.ubuntu.com/9.10/) with the following options...

Detect keyboard layout? no
Use eth1: (eth0 is NIC on motherboard, which typically hasn't worked for me. I've needed to install a 2nd NIC on all my linux servers)
hostname: LinuxFAQ (or whatever you want)
Guided - Use entire disk and set up LVM
Remove existing logical volume data? Yes
Write the changes to disk and configure LVM? Yes
Write the changes to disk? Yes
Full name for new user: LinuxAdmin
Username for your account: LinuxAdmin
Password: <password>
Encrypt Home dir? Yes
No http proxy
For test server - No automatic updates
For permanent server - Install security updates automatically
Select LAMP server and OpenSSH Server
MySQL "root" user password: <password>
remove disc, reboot

2. Log in, and run

Code: Select all

ifconfig 
to find your inet address.

3. Install Putty on Windows machine (http://www.putty.org)
Type in the Inet address in Hostname (or IP address field), click open. This will open a command line prompt on a windows computer, where you can remotely execute commands on the Linux server. From this point forward, you may work through Putty, or directly on the Linux server.

4. On a domain, LDAP will allow domain users to log into the FAQ using their existing domain credentials.

Code: Select all

sudo apt-get install php5-ldap 
3. Install http://winscp.net/eng/index.php on Windows machine

4. Download and extract phpmyfaq 2.6.4 on windows machine, use Winscp to transfer phpmyfaq folder to /Home/%username%/phpmyfaq-2.6.4

5. Transfer the files from your home directory to the servers web directory. Any folder under /var/www/ will appear as a website directory.

Code: Select all

sudo cp -r /home/%username%/phpmyfaq-2.6.4 /var/www/faq
6. Phpmyadmin is a web interface for managing MySQL

Code: Select all

sudo apt-get install phpmyadmin
Choose apache2
Yes to dbconfig-common


7. Goto http://<LinuxServer>/phpmyadmin, login with User: root, pass: whatever you set.

8. Under the Databases tab, create a new database. Type in the name LinuxFAQ and hit Create.

9. On the linux server, type in

Code: Select all

cd /var/www/faq
10. create folders for faq

Code: Select all

sudo mkdir -p ./attachments ./config ./data
11. modify folder permissions for faq

Code: Select all

sudo chmod 777  ./attachments ./config ./data
12. Configure PhpMyFAQ sql, goto http://<linuxserver>/faq and fill in the following

SQL Server host: 127.0.0.1
SQL username: root
SQL password: <password>
SQL Database: LinuxFAQ
Table Prefix: LinuxFAQ

Enable LDAP support (this file can be modified under /var/www/faq/config/)
LDAP server host: Primary Domain Controller's IP
LDAP server port: 389
LDAP username: DOMAIN\user
LDAP password: DOMAIN\user's password
DN: ou=sub folder ou=user folder, dc=any subdomains, dc=domain, dc=com

http://anothersysadmin.wordpress.com/20 ... buntu-804/

PhpMyFAQ info
Admin real name: LinuxAdmin
Email:
Admin's user: admin (has to be admin)
Admin pw: <password>

13. Once configured, it suggests deleting ./install/setup.php and ./install/update.php. I kept the files for now, but if you want to delete, type..

Code: Select all

Sudo rm /var/www/faq/install/setup.php
sudo rm /var/www/faq/install/setup.php

14. http://<linuxserver>/faq Login as Admin/pw, then click administration and goto the config tab. Click main configuration to expand, and scroll down and select Do you want to enable LDAP support, check box means yes. Save configuration. You should be able to log in using domain information as well using DOMAIN\user.

15. Webmin (http://www.ubuntugeek.com/3171.html)

I used Ubuntu 9.10, because 10.04 doesn't support one of the modules from the following commands.

Code: Select all

sudo aptitude install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl libmd5-perl

Code: Select all

wget http://prdownloads.sourceforge.net/webadmin/webmin_1.500_all.deb

Code: Select all

sudo dpkg -i webmin_1.500_all.deb
https://<linuxserver>:10000 , accept the certificate.
LinuxAdmin
password


16. Postfix will forward emails when new users are created in FAQ. I've configured mine to work with our Exchange 2003 server.

Code: Select all

sudo apt-get install postfix
... Use Tab to highlight OK, select Internet Site, take default system mail name

Code: Select all

cd /etc/postfix/
sudo nano main.cf
relay host = exchange server IP
Cntrl+X to save and exit

Code: Select all

sudo mkfifo /var/spool/postfix/public/pickup
sudo /etc/init.d/postfix restart
http://<linuxserver>/faq Login as Admin/pw,
In Configuration, change Email address of administrator.


17. In FAQ configuation, set permission level from Basic to Medium. This will allow for group permissions on categories.

18. (optional) To make the Linux server a domain member..

http://ubuntuforums.org/showthread.php?t=91510
Realm kerberos server: Primary Domain Controller
Thorsten
Posts: 15559
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Howto: Ubuntu/LDAP/Postfix

Post by Thorsten »

Hi,

thank you very much!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
pinky
Posts: 1
Joined: Thu May 15, 2014 11:45 am

Re: Howto: Ubuntu/LDAP/Postfix

Post by pinky »

Is it possible to add walkthrough for SSO on LAMP.

Thanks
Post Reply