https://wiki.archlinux.org/api.php?action=feedcontributions&user=Partha&feedformat=atomArchWiki - User contributions [en]2024-03-28T15:36:12ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Eclipse&diff=141802Eclipse2011-05-17T13:36:54Z<p>Partha: </p>
<hr />
<div>[[Category:Development (English)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Eclipse}}<br />
{{i18n_entry|Русский|Eclipse (Русский)}}<br />
{{i18n_links_end}}<br />
<br />
{{stub}}<br />
<br />
== Introduction ==<br />
Eclipse is an open source community project, which aims to provide a universal development platform. The Eclipse project is most widely known for its cross-platform integrated development environment (IDE), and the arch linux packages (and this guide) relate specifically to this.<br />
<br />
The Eclipse IDE is largely written in Java but can be used to develop applications in a number of languages, including Java, C/C++, PHP and Perl. The IDE can also provide subversion support (see below) and task management (either through its built-in TODO list or through the eclipse-mylyn package).<br />
<br />
== Installing Eclipse ==<br />
<br />
It is very easy to install the Eclipse SDK in Arch Linux:<br />
# pacman -S eclipse<br />
<br />
This base package has Java development support built in.<br />
<br />
=== With C/C++ support ===<br />
<br />
If you want to use Eclipse for C/C++ development, also install the eclipse cdt<br />
# pacman -S eclipse-cdt<br />
<br />
=== With perl support ===<br />
<br />
If you want to use Eclipse for Perl development, also install EPIC available from AUR:<br />
# pacman -S eclipse-epic<br />
<br />
=== With PHP support ===<br />
<br />
If you want to use Eclipse for PHP development, also install phpeclipse:<br />
# pacman -S eclipse-phpeclipse<br />
<br />
=== Using the Sun JDK in place of OpenJDK ===<br />
<br />
Eclipse depends on openjdk6 by default, which you can easily replaced by jdk.<br />
# pacman -S jdk<br />
<br />
By the way, you may want to link the file /opt/java/bin/java to /usr/bin/java:<br />
# ln -s /opt/java/bin/java /usr/bin<br />
<br />
== Setting up Eclipse ==<br />
After installing eclipse via pacman, you might want to do some configuration.<br />
<br />
===enable updates===<br />
Your eclipse doesn't have any update sites, yet. On the eclipse site you find several uris, which you can add here as update site ''Window -> Preferences -> Install/Update -> Available Software Sites -> Add...''<br />
For me this uri worked wonderful:<br />
http://download.eclipse.org/releases/maintenance<br />
But (if you're using Eclipse 3.6.x, codename Helios) you should use:<br />
http://download.eclipse.org/releases/helios<br />
and automatically added several locations which you can enable in the ''Available Software Sites'' menu.<br />
After that you can update and install new Software in "Help" menu<br />
<br />
== Subversion support ==<br />
There are packages in AUR for enabling Subversion support.<br />
<br />
===eclipse-subclipse===<br />
http://aur.archlinux.org/packages.php?do_Details=1&ID=5280<br />
# pacman -S eclipse-subclipse<br />
<br />
Take a look at http://www-128.ibm.com/developerworks/opensource/library/os-ecl-subversion/ for more information about Subclipse.<br />
<br />
===eclipse-subversive===<br />
http://aur.archlinux.org/packages.php?do_Details=1&ID=10740<br />
# aurbuild -s eclipse-subversive<br />
<br />
== Enable javadoc integration ==<br />
Want to see API entries when hovering the mouse pointer over standard Java methods?<br />
<br />
=== Online Version ===<br />
<br />
If you have constant internet access on your machine, you can use the online documentation provided by sun. Just follow these instructions:<br />
<br />
# Go to Window/Preferences, then go to Java/Installed JREs.<br />
# There should be one named "java" with the type "Standard VM". Select this and click Edit.<br />
# Select the /opt/java/jre/lib/rt.jar item under "JRE system libraries:", then click "Javadoc Location...".<br />
# Enter "http://java.sun.com/javase/6/docs/api/" in the "Javadoc location path:" text field.<br />
# Done!<br />
<br />
=== Offline Version ===<br />
<br />
If you have no internet connection on your development machine, or do not want to constantly loose traffic for the documentation, you can store the documentation on your local harddisk.<br />
<br />
# Start your favorite webbrowser and navigate to http://java.sun.com/javase/downloads/index.jsp<br />
# Search for "Java SE 6 Documentation" and click the Downloadlink.<br />
# Follow the instructions to download the file "jdk-6-doc.zip" to your Harddrive (e.g. /home/docs/jdk-6-doc.zip).<br />
# Go to Window/Preferences, then go to Java/Installed JREs.<br />
# There should be one named "java" with the type "Standard VM". Select this and click Edit.<br />
# Select the /opt/java/jre/lib/rt.jar item under "JRE system libraries:", then click "Javadoc Location...".<br />
# Select the point "Javadoc in archive"<br />
# Enter the path to the previous downloaded "jdk-6-doc.zip" (e.g. /home/docs/jdk-6-doc.zip) in the "Archive path:" text field.<br />
# Done!<br />
<br />
<br />
== Troubleshooting ==<br />
<br />
=== Autocompletion and javadoc render crash ===<br />
For some reasons, libxul may crash. To fix this issue, you can install libwebkit and try to add the following lines in your /usr/share/eclipse/eclipse.ini : <br />
<br />
-Dorg.eclipse.swt.browser.UseWebKitGTK=true<br />
<br />
If it's not working (or if you don't want to install libwebkit) : <br />
<br />
-Dorg.eclipse.swt.browser.XULRunnerPath=/usr/lib/xulrunner-2.0/</div>Parthahttps://wiki.archlinux.org/index.php?title=OpenLDAP_Authentication&diff=73769OpenLDAP Authentication2009-08-12T11:05:21Z<p>Partha: /* Populate LDAP Tree with Base Data */</p>
<hr />
<div>== Introduction and Concepts ==<br />
<br />
This guide is composed from bits and pieces of LDAP guides and forums around the net. I borrowed very heavily from Eliott's (cactus) OpenLDAP guide [[http://solarblue.net/docs/ldap.htm Ldap Server Setup]] which is very well written. Unfortunately Arch Linux has some differences in the way things are setup. It is also the case that most LDAP guides online fall into one of 3 categories: too general, outdated or uses distro specific tools (i.e. authconfig). This guide is written specifically with Arch linux in mind and will try to illustrate both LDAP concepts and implementation from the point of view of someone who has never used LDAP before (i.e. the author).<br />
<br />
=== OpenLDAP ===<br />
<br />
UNDER CONSTRUCTION!<br />
<br />
=== NSS and PAM ===<br />
<br />
UNDER CONSTRUCTION!<br />
<br />
== Server Setup ==<br />
<br />
=== Install OpenLDAP ===<br />
<br />
pacman -Sy openldap openldap-clients<br />
<br />
=== Configure OpenLDAP ===<br />
<br />
Generate root password:<br />
<br />
slappasswd -h {SSHA}<br />
<br />
Edit /etc/openldap/slapd.conf<br />
<br />
: At a minimum your slapd.conf file should include these settings: <br />
include /etc/openldap/schema/core.schema<br />
include /etc/openldap/schema/cosine.schema<br />
include /etc/openldap/schema/inetorgperson.schema<br />
pidfile /var/run/slapd.pid<br />
argsfile /var/run/slapd.args<br />
database bdb<br />
suffix "dc=example,dc=org"<br />
rootdn "cn=admin,dc=example,dc=org"<br />
rootpw {SSHA}AAAABBBBCCCCDDDD #NOTE: paste in the output of the slappasswd command above <br />
directory /var/lib/openldap/openldap-data<br />
index objectClass eq<br />
<br />
Provide a database config:<br />
cp /etc/openldap/DB_CONFIG.example /var/lib/openldap/openldap-data/DB_CONFIG<br />
<br />
Start OpenLDAP:<br />
<br />
/etc/rc.d/slapd start<br />
<br />
=== Populate LDAP Tree with Base Data ===<br />
<br />
Create a file called base.ldif with the following text:<br />
<br />
# example.org<br />
dn: dc=example,dc=org<br />
objectClass: dcObject<br />
objectClass: organization<br />
o: Example Organization<br />
dc: example<br />
<br />
# admin, example.org<br />
dn: cn=admin,dc=example,dc=org<br />
cn: admin<br />
description: LDAP administrator<br />
roleOccupant: dc=example,dc=org<br />
objectClass: organizationalRole<br />
objectClass: top<br />
<br />
# People, example.org<br />
dn: ou=People,dc=example,dc=org<br />
ou: People<br />
objectClass: top<br />
objectClass: organizationalUnit<br />
<br />
# Group, example.org<br />
dn: ou=Group,dc=example,dc=org<br />
ou: Group<br />
objectClass: top<br />
objectClass: organizationalUnit<br />
<br />
Add it to your OpenLDAP Tree:<br />
<br />
ldapadd -x -D "cn=admin,dc=example,dc=org" -W -f base.ldif<br />
<br />
Test to make sure the data was imported:<br />
<br />
ldapsearch -x -b 'dc=example,dc=org' '(objectclass=*)'<br />
<br />
<br />
*Note: I had to add "slapd: ALL" to /etc/hosts.allow before running the above command.<br />
<br />
=== Configure TLS Encryption ===<br />
<br />
It's a good idea to configure TLS to encrypt the exchange of information between client and server. This way passwords, which are normally sent plain-text, cannot be easily sniffed from the wire. In order to use TLS, we must first create a certificate. You can have a certificate signed, or create your own Certificate Authority (CA), but for our purposed, a self-signed certificate will suffice. '''IMPORTANT:''' OpenLDAP cannot use a certificate that has a password associated to it.<br />
<br />
To create a ''self-signed'' certificate, type the following:<br />
<br />
openssl req -new -x509 -nodes -out slapdcert.pem -keyout slapdkey.pem -days 365<br />
<br />
You will be prompted for information about your ldap server. Much of the information can be left blank. The most important information is the common name. This must be set to the DNS name of your ldap server. If your LDAP server's IP address resolves to example.org but its server certificate shows a CN of bad.example.org, LDAP clients will reject the certificate and will be unable to negotiate TLS connections (apparently the results are wholly unpredictable).<br />
<br />
Now that the certificate files have been created copy them to /etc/openldap/ssl/ (if this directory doesn't exist create it) and secure them. '''IMPORTANT:''' slapdcert.pem must be world readable because it contains the public key.<br />
<br />
cp slapdcert.pem slapdkey.pem /etc/openldap/ssl/<br />
chmod 400 slapdkey.pem<br />
chmod 444 slapdcert.pem<br />
<br />
Edit the daemon configuration file (/etc/openldap/slapd.conf) to tell LDAP where the certificate files reside by adding the following lines:<br />
<br />
# Certificate/SSL Section<br />
TLSCipherSuite HIGH:MEDIUM:+SSLv2<br />
TLSCertificateFile /etc/openldap/ssl/slapdcert.pem<br />
TLSCertificateKeyFile /etc/openldap/ssl/slapdkey.pem<br />
<br />
The TLSCipherSuite specifies a list of OpenSSL ciphers from which slapd will choose when negotiating TLS connections, in decreasing order of preference. In addition to those specific ciphers, you can use any of the wildcards supported by OpenSSL. '''NOTE:''' HIGH, MEDIUM, and +SSLv2 are all wildcards. <br />
<br />
To see which ciphers are supported by your local OpenSSL installation, type the following:<br />
<br />
openssl ciphers -v ALL<br />
<br />
In order to tell OpenLDAP to start using encryption edit /etc/rc.d/slapd and change<br />
<br />
stat_busy "Starting OpenLDAP"<br />
[ -z "$PID" ] && /usr/sbin/slapd<br />
<br />
to<br />
<br />
stat_busy "Starting OpenLDAP"<br />
[ -z "$PID" ] && `/usr/sbin/slapd -h ldaps:///`<br />
<br />
This will cause OpenLDAP to accept encrypted. '''IMPORTANT:''' If you created a self-signed certificate above be sure to add the following line to /etc/openldap/ldap.conf or you won't be able connect to the server to test it:<br />
<br />
TLS_REQCERT allow<br />
<br />
Restart the server:<br />
<br />
/etc/rc.d/slapd restart<br />
<br />
Test that the server is encrypting traffic run the following command:<br />
<br />
ldapsearch -x -H ldaps://example.org -b 'dc=example,dc=org' '(objectclass=*)'<br />
<br />
<br />
== Client Setup ==<br />
<br />
=== OpenLDAP ===<br />
<br />
'''IMPORTANT:''' If you created a self-signed certificate above be sure to add the following line to /etc/openldap/ldap.conf or you won't be able connect to the server:<br />
<br />
TLS_REQCERT allow<br />
<br />
<br />
=== NSS_LDAP ===<br />
<br />
Install the nss_ldap module:<br />
<br />
pacman -Sy nss_ldap<br />
<br />
Edit /etc/nss_ldap.conf:<br />
<br />
host <SERVER_IP><br />
base dc=example,dc=org<br />
rootbinddn cn=admin,dc=example,dc=org<br />
port 636<br />
pam_login_attribute uid<br />
pam_template_login_attribute uid<br />
nss_base_passwdou=People,dc=example,dc=org?one<br />
nss_base_shadowou=People,dc=example,dc=org?one<br />
nss_base_group ou=Group,dc=example,dc=org?one<br />
ssl start_tls<br />
ssl on<br />
<br />
# This is only needed if your using a self-signed certificate.<br />
tls_checkpeer no<br />
<br />
Edit /etc/nsswitch.conf<br />
<br />
passwd: files ldap<br />
group: files ldap<br />
shadow: files ldap<br />
<br />
<br />
=== PAM_LDAP ===<br />
<br />
Install pam_ldap module:<br />
<br />
pacman -Sy pam_ldap<br />
<br />
Edit /etc/pam_ldap.conf:<br />
<br />
host <SERVER_IP><br />
base dc=example,dc=org<br />
rootbinddn cn=admin,dc=example,dc=org<br />
port 636<br />
pam_login_attribute uid<br />
pam_template_login_attribute uid<br />
nss_base_passwdou=People,dc=example,dc=org?one<br />
nss_base_shadowou=People,dc=example,dc=org?one<br />
nss_base_group ou=Group,dc=example,dc=org?one<br />
ssl start_tls<br />
ssl on<br />
<br />
# This is only needed if your using a self-signed certificate.<br />
tls_checkpeer no<br />
<br />
Edit /etc/pam.d/login:<br />
<br />
auth requisite pam_securetty.so<br />
auth requisite pam_nologin.so<br />
auth sufficient pam_ldap.so <br />
auth required pam_env.so<br />
auth required pam_unix.so nullok try_first_pass<br />
account sufficient pam_ldap.so<br />
account required pam_access.so<br />
account required pam_unix.so<br />
session required pam_motd.so<br />
session required pam_limits.so<br />
session optional pam_mail.so dir=/var/spool/mail standard<br />
session optional pam_lastlog.so<br />
session required pam_unix.so<br />
<br />
Edit /etc/pam.d/passwd:<br />
<br />
password sufficient pam_ldap.so<br />
password required pam_unix.so shadow md5 nullok<br />
<br />
Edit /etc/pam.d/shadow:<br />
<br />
auth sufficient pam_ldap.so<br />
auth sufficient pam_rootok.so<br />
auth required pam_unix.so<br />
account sufficient pam_ldap.so<br />
account required pam_unix.so<br />
session sufficient pam_ldap.so<br />
session required pam_unix.so<br />
password sufficient pam_ldap.so<br />
password required pam_permit.so<br />
<br />
edit /etc/pam.d/su:<br />
<br />
auth sufficient pam_ldap.so<br />
auth sufficient pam_rootok.so<br />
auth required pam_unix.so use_first_pass<br />
account sufficient pam_ldap.so<br />
account required pam_unix.so<br />
session sufficient pam_ldap.so<br />
session required pam_unix.so<br />
<br />
edit /etc/pam.d/sshd:<br />
<br />
auth sufficient pam_ldap.so<br />
auth required pam_securetty.so #Disable remote root<br />
auth required pam_unix.so try_first_pass<br />
auth required pam_nologin.so<br />
auth required pam_env.so<br />
account sufficient pam_ldap.so<br />
account required pam_unix.so<br />
account required pam_time.so<br />
password sufficient pam_ldap.so<br />
password required pam_unix.so<br />
session required pam_unix_session.so<br />
session required pam_limits.so<br />
<br />
edit /etc/pam.d/other:<br />
<br />
auth sufficient pam_ldap.so<br />
auth required pam_unix.so<br />
account sufficient pam_ldap.so<br />
account required pam_unix.so<br />
password sufficient pam_ldap.so<br />
password required pam_unix.so<br />
session required pam_unix.so<br />
<br />
=== Name Service Cache Daemon ===<br />
<br />
READ THIS FIRST: [[http://bbs.archlinux.org/viewtopic.php?t=9401 NSCD Bugged in Arch Linux]]<br />
<br />
Fix nscd:<br />
<br />
mkdir -p /var/db/nscd/<br />
mkdir -p /var/run/nscd/<br />
<br />
Run nscd:<br />
<br />
/etc/rc.d/nscd start<br />
<br />
== Links and Resources ==<br />
<br />
Eliott's (cactus) guide for a RedHat Server: [[http://solarblue.net/docs/ldap.htm Ldap Server Setup]]<br />
<br />
One of the best OpenLDAP clients: [[http://phpldapadmin.sourceforge.net/ phpLDAPadmin]]<br />
<br />
Debian OpenLDAP setup: [[http://www.fatofthelan.com/articles/articles.php?pid=24 Using LDAP for single authentication]]<br />
<br />
How to integrate OpenLDAP for MacOSX, Windows and Linux: [[http://www.cs.dixie.edu/ldap/ Heterogeneous Network Authentication Introduction]]</div>Partha