Debian Codegraph @

doc/sources/admin/quickstart.rst

raw
1 Quick start tutorial
2 ====================
3
4
5 .. attention::
6
7 This tutorial will guide you into a minimal
8 installation and configuration procedure. You need some prerequisites:
9
10 - Root access to a Debian, Ubuntu, CentOS or RHEL test system
11 - A web browser
12 - A cup of coffee (or tea, we are open minded)
13
14
15
16 Installation
17 ------------
18
19 Debian / Ubuntu
20 ~~~~~~~~~~~~~~~
21
22 ::
23
24 apt install apt-transport-https curl
25 curl https://lemonldap-ng.org/lemonldap-debian-packages-pub.gpg | gpg --dearmor > /usr/share/keyrings/lemonldap-debian-packages-pub.gpg
26 echo "deb [arch=amd64 signed-by=/usr/share/keyrings/lemonldap-debian-packages-pub.gpg] https://lemonldap-ng.org/deb stable main" > /etc/apt/sources.list.d/lemonldap-ng.list
27 apt update
28 apt install lemonldap-ng
29
30 CentOS / RHEL
31 ~~~~~~~~~~~~~
32
33 ::
34
35 curl https://lemonldap-ng.org/_media/rpm-gpg-key-ow2 > /etc/pki/rpm-gpg/RPM-GPG-KEY-OW2
36 echo '[lemonldap-ng]
37 name=LemonLDAP::NG packages
38 baseurl=https://lemonldap-ng.org/redhat/stable/$releasever/noarch
39 enabled=1
40 gpgcheck=1
41 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-OW2' > /etc/yum.repos.d/lemonldap-ng.repo
42 yum update
43 yum install epel-release
44 yum install lemonldap-ng
45 # If you use SELinux
46 yum install lemonldap-ng-selinux
47
48 SSO domain configuration
49 ------------------------
50
51 LemonLDAP::NG needs all its components to be served on the same DNS domain.
52
53 If you can edit your `/etc/hosts` file or have access to a DNS server, check :ref:`quickstart_own_domain`, if you have no way to modify your DNS configuration, check :ref:`quickstart_nipio`.
54
55 .. _quickstart_own_domain:
56
57 Using your own domain
58 ~~~~~~~~~~~~~~~~~~~~~
59
60 The defaut SSO domain is ``example.com``. You can keep it for your tests
61 or change it, for example for ``mydomain.com``:
62
63 ::
64
65 sed -i 's/example\.com/mydomain.com/g' \
66 /etc/lemonldap-ng/* /var/lib/lemonldap-ng/conf/lmConf-1.json \
67 /etc/nginx/conf.d/* \
68 /etc/httpd/conf.d/* \
69 /etc/apache2/sites-available/*
70
71 In order to be able to test, update your DNS or your local ``hosts``
72 file to map these names to the SSO server IP:
73
74 - auth.mydomain.com
75 - manager.mydomain.com
76 - test1.mydomain.com
77 - test2.mydomain.com
78
79 For example, you can enter the following command on your local computer:
80 (adjust according to your server IP and test domain)
81
82 ::
83
84 echo "192.168.1.30 auth.mydomain.com manager.mydomain.com test1.mydomain.com test2.mydomain.com" >> /etc/hosts
85
86 .. _quickstart_nipio:
87
88 Using nip.io (or other DNS wildcard services)
89 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
90
91 If you cannot edit /etc/hosts or your DNS zone, don't give up yet, you can use services such as `nip.io`_, `xip.io`_, `sslip.io`_ or others.
92
93 .. _nip.io: http://nip.io/
94 .. _xip.io: http://xip.io/
95 .. _sslip.io: https://sslip.io
96
97 For example, if your server IP is 192.168.12.13, you can use 192-168-12-13.nip.io as your SSO domain:
98
99 ::
100
101 sed -i 's/example\.com/192-168-12-13.nip.io/g' \
102 /etc/lemonldap-ng/* /var/lib/lemonldap-ng/conf/lmConf-1.json \
103 /etc/nginx/conf.d/* \
104 /etc/httpd/conf.d/* \
105 /etc/apache2/sites-available/*
106
107 .. warning::
108
109 nip.io, xip.io or any DNS wildcard services mentionned in this section are not affiliated with the LemonLDAP::NG project in any way. These services will receive DNS requests that will allow them to know your test server's IP address. If this is an issue for you, do not use these services.
110
111 Run
112 ---
113
114 Starting services
115 ~~~~~~~~~~~~~~~~~
116
117 Debian / Ubuntu
118 '''''''''''''''
119
120 Enable the Nginx virtualhosts and restart the web server and LemonLDAP::NG server to apply the configuration changes ::
121
122 cd /etc/nginx/sites-enabled
123 ln -s ../sites-available/*nginx* .
124 systemctl restart lemonldap-ng-fastcgi-server
125 systemctl restart nginx
126
127 CentOS / RHEL
128 '''''''''''''
129
130 Enable and start httpd ::
131
132 systemctl enable httpd
133 systemctl start httpd
134
135
136 Open SSO session
137 ~~~~~~~~~~~~~~~~
138
139 Go on http://auth.mydomain.com and log with one of the demonstration
140 account.
141
142 ====== ======== =============
143 Login Password Role
144 ====== ======== =============
145 rtyler rtyler user
146 msmith msmith user
147 dwho dwho administrator
148 ====== ======== =============
149
150 Access protected application
151 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
152
153 Try http://test1.mydomain.com or http://test2.mydomain.com
154
155 Edit configuration
156 ~~~~~~~~~~~~~~~~~~
157
158 Log with the dwho account and go on http://manager.mydomain.com