only need to add auth part, which equals adding aktk to baseurl
[root@dhcp05 yum.repos.d]# yum list Loading "auth" plugin Loading "installonlyn" plugin // the following stuff come form auth plugin authen_key = 26E354BDC5744E25852B035A3F92302D Usage: axtu-authen-client-cui [OPTION...] -t, --tk-path=STRING follow with file path for temporary-key -a, --address-path=STRING follow with file path for repository addresses -i, --id=STRING follow with Your member Id -p, --password=STRING follow with Your password for member ID -n, --product-number=STRING follow with your product number -s, --system-name=STRING follow with your system name -d, --disable-collect-info You may not allow sending the system information to server. -r, --remove-key You can remove the authentication key in your system. // auth module ends here Setting up repositories http://10.1.0.55/auth/asianux2/AXS3-RF/x86_64/UPDATE/repodata/repomd.xml: [Errno 14] HTTP Error 401: Authorization Required Trying other mirror. Error: Cannot open/read repomd.xml file for repository: core [root@dhcp05 yum.repos.d]# ls asianux.repo asianux.repo.64 asianux.repo.bak
//if you see Authorization Required, that means everything is alright
[root@dhcp05 pluginconf.d]# ls auth.conf hello.conf installonlyn.conf [root@dhcp05 pluginconf.d]# pwd /etc/yum/pluginconf.d
[root@dhcp05 yum.repos.d]# vim asianux.repo [core] name=Asianux Server 3 baseurl=http://10.1.0.55/auth/asianux2/AXS3-RF/x86_64/UPDATE/ enabled=1 gpgcheck=1 gpgkey=file:///usr/share/doc/asianux-release/RPM-GPG-KEY
server IP: 10.1.0.55
and the rest is just a 155 clone + creatrepo
the process is:
first time you run this
/usr/share/axtu-authen-client/bin/axtu-authen-client-cui -i user3 -p abc123 -n 203T5-44QG2-0000N-383LN-MGN2Q
ak is generated and saved in /var/axtu/asianux-auth, but tk is not obtained.
then I run
[root@dhcp05 ~]# axtu
right after I click UPDATE, tk is got
my own vmware server IP: 10.1.0.55, has a little problem:
when I use 246, tk is read out by my little program
#!/usr/bin/python import os while 1: os.system("ls tmp >tt.txt") tk_filename = open("tt.txt").readline() if tk_filename: print "got you !" tk_filename = tk_filename.rstrip() #remove trailing "\n" tk = open("tmp/"+tk_filename).readline() print tk break
but when connecting to my 55, I first time endup with a error:
[root@dhcp05 axtu]# ./tk.py got you ! Traceback (most recent call last): File "./tk.py", line 10, in ? tk = open("tmp/"+tk_filename).readline() IOError: [Errno 2] No such file or directory: 'tmp/authentication.php' [root@dhcp05 axtu]#
NOTE: when I see the above error, tk file in phpMyAdmin is empty this means a error has occured, strange thing is this is not always reproducable. it is very easy to get tk right.
but second time is ok, I do not know why, but I got this:
[root@dhcp05 axtu]# ./tk.py got you ! 76008789811B419580C21762F7A8997C [root@dhcp05 axtu]#
and I realtimely checked through https://10.1.0.55/phpAdmin tk is changed, though it is in encrypted form.
Now ak and tk are all available, I now try to change baseurl,
[root@dhcp05 yum.repos.d]# vim asianux.repo
then run
[root@dhcp05 yum.repos.d]# yum list
[Errno 14] HTTP Error 404: Not Found //when the ip is changed to 54 Errno 14] HTTP Error 401: Authorization Required //when nothing is changed [Errno 14] HTTP Error 400: Bad Request //when use ak:tk@10.1.0.55 [Errno 14] HTTP Error 401: Authorization Required //when baseurl=http://426994C693EAA75344:760@10.1.0.55/auth/asianux2/AXS3-RF/x86_64/UPDATE/
NOTE:the GRANT issue fooled me again, see here auth_mysql
[root@dhcp05 axtu]# wget --no-check-certificate https://426994C693EA41C2B9D77F1760A75344:9EDEBD84EEBB477693E43D8E185791AB@10.1.0.66/auth/asianux2/AXS3-RF/x86_64/UPDATE/RPMS/sos-1.7-9.16.2AXS3.noarch.rpm --05:52:07-- https://426994C693EA41C2B9D77F1760A75344:*password*@10.1.0.66/auth/asianux2/AXS3-RF/x86_64/UPDATE/RPMS/sos-1.7-9.16.2AXS3.noarch.rpm Connecting to 10.1.0.66:443... connected. WARNING: cannot verify 10.1.0.66's certificate, issued by `/C=--/ST=SomeState/L=SomeCity/O=SomeOrganization/OU=SomeOrganizationalUnit/CN=localhost.localdomain/emailAddress=root@localhost.localdomain': Self-signed certificate encountered. WARNING: certificate common name `localhost.localdomain' doesn't match requested host name `10.1.0.66'. HTTP request sent, awaiting response... 200 OK Length: 118514 (116K) [application/x-rpm] Saving to: `sos-1.7-9.16.2AXS3.noarch.rpm' 100%[====================================================================================>] 118,514 --.-K/s in 0.004s 05:52:08 (26.1 MB/s) - `sos-1.7-9.16.2AXS3.noarch.rpm' saved [118514/118514] [root@dhcp17 x86_64]# createrepo UPDATE // on server [root@dhcp05 yum.repos.d]# wget --no-check-certificate http://426994C693EA41C2B9D77F1760A75344:9EDEBD84EEBB477693E43D8E185791AB@10.1.0.66/auth/asianux2/AXS3-RF/x86_64/UPDATE/repodata/repomd.xml --06:00:23-- http://426994C693EA41C2B9D77F1760A75344:*password*@10.1.0.66/auth/asianux2/AXS3-RF/x86_64/UPDATE/repodata/repomd.xml Connecting to 10.1.0.66:80... connected. HTTP request sent, awaiting response... 200 OK Length: 951 [text/xml] Saving to: `repomd.xml' 100%[====================================================================================>] 951 --.-K/s in 0s 06:00:23 (101 MB/s) - `repomd.xml' saved [951/951] //but even in yum.repo.d, I have this baseurl=http://426994C693EA41C2B9D77F1760A75344:9EDEBD84EEBB477693E43D8E185791AB@10.1.0.66/auth/asianux2/AXS3-RF/x86_64/UPDATE/ //and firefox also works with the above url. //but stll this error, when I run $yum list Errno 14] HTTP Error 400: Bad Request but when I use peter:111111 for baseurl, yum list done, haha, why? I even paied specieal care to /var/cache/yum/, but same solution.
SO if I run mysql command manually to insert aktk into db, I believe it will work out for yum, since peter:111111 already works
Answer: now I know its the too old version of python or yum that case this problem, so all I need to do for this is yum_upgrade